That’s interesting, I’ve never done the math myself but I’ve seen it mentioned in many places that those are the two most densely populated countries in the world. Maybe they are only looking at the density in urban areas and excluding agricultural areas?
They were probably excluding city-states like Singapore and Vatican City (Macau is probably excluded because it is neither in theory nor in function a country, but is a special administrative region of China.) Or setting a minimum size or population threshold that has a similar exclusive effect.
Oh, I see now that the stats I frequently hear cited exclude small city-states, and have a smallish threshold of somewhere in the 10 to 20,000,000 range for the country population.