Is there another way of declaring a variable in java?

Viewed 70

I've come across this piece of code in Java and I thought this wouldn't compile since variables a and s are not declared. Not only it compiles but also runs successfully and it prints "5". What am I missing here ?

public static void main(String[] args) {
     int j=5;
     long h = j++, s, a;
     System.out.println(h); 
 }
0 Answers
Related