-
What is the output of this program?
public class Result
{
public static void main(String args[])
{
final int p=10, q=20;
while(p>q)
{
System.out.println("Hello");
}
System.out.println("Java");
}
}
-
- compile time error
- Hello world
- run time error
- Hello
- None of these
Correct Option: A
Every final variable is compile time constant.