Here's a Java program that calculates in which year the population of NYC was about 10,000 people:
```
public class PopulationCalculator {
public static void main(String[] args) {
int population = 8175133; // Population of NYC in 2010
int year = 2010;
while (population >= 10000) {
population /= 2; // Divide population by 2 every 40 years
year += 40; // Add 40 years to the current year
}
System.out.printf("The population of NYC was about 10,000 people in the year %d.", year);
}
}
```
In this program, we start with the population of NYC in 2010 and the current year (2010). Then we use a `while` loop to divide the population by 2 every 40 years and add 40 years to the current year until the population is less than 10,000 people.
Once the loop ends, we use `printf` to output the year when the population was about 10,000 people. The `%d` format specifier is used to insert the year value into the output string.
Note: This program assumes that the population doubles exactly every 40 years, which may not be entirely accurate.