Fruit bats are divided into two types of foragers: specialists that use limited core plant taxa, and generalists that use a variety of plants. We examined the food habits of Pteropus dasymallus at two sites with different flora, a forested and an urbanized area in a subtropical island. The plant species used differed between the two sites, and the degree of use of three food types (fruits, flowers, and leaves) also changed. These results suggest that P. dasymallus shows dietary plasticity according to food conditions of living locations. The plant diversity was higher in the urbanized area than in the forested area, however, actual diet breadth (Levins' index) was lower in the urbanized area, due to the intensive use of specific plant species in the urbanized area. The bats used Ficus microcarpa, as a core plant, which long fruiting periods and high abundance in the urbanized area. In addition, we compared these findings on the diet breadths to those reported in other Pteropus species, and suggested that diet breadths of flying foxes might be generalized in subtropics in which food shortages occur irregularly and be specialized in tropics with a high abundance of specific plants with long fruiting periods.