As others have noted, Java for-each iterates over an array or collection. "3" is not an array or collection, it is one value. If Java allows the construct that you propose, the only sequential implementation will be "iterate" over a single value, 3. This is:
for (int i : 3) { System.out.println(i); }
outputs:
3
This is not very useful, so they probably did not implement it.
Your question assumes that a single value of type "3" implies a range. But why do you assume {0,1,2,3}? Why not {1,2,3}? Or {-3, -2, -1, 0, 1, 2, 3}? Or {0.5, 1.0, 1.5, 2.0, 2.5, 3}? Or literally an infinite number of other options.
To make this specific, you need to specify a start value, end value and increment. Hmm, maybe we could come up with this entry:
for (int i=0,3,1)
But this is still ambiguous. It is unclear whether we want to continue to i == 3 or to the last value <3. And we probably need to distinguish the plus plus from the minus increment. So, how about this, more flexible notation:
for (int i=0; i<=3; i=i+1)
Oh wait, what is already supported .:-)