What is the output of the following Java program?
class Main {
public static void main(String args[]){
final int i;
i = 10;
System.out.println(i);
}
}
10. What is the output of the following Java program?
class Main {
public static void main(String args[]){
final int i;
i = 10;
System.out.println(i);
}
}
Answer Posted / hrindows@gmail.com
Output
10
Since i is the blank final variable. It can be initialized only once. We have initialized it to Therefore, 10 will be printed.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is use of a abstract variable?
What is JDBC Driver interface?How can you retrieve data from the ResultSet
What is Garbage Collection in Java
What is primitive array?
Is space a char?
how to write a server program and sending the mails to the server using smtp protocol please help me
What are the differences between stringbuffer and stringbuilder?
Hi all, I am dng a mini project on FileSplitter application which splits the GBs of logfile into Smaller chunks(mbs) depending on the split size." How to handle GBs file? I am getting OutOfMemoryException, when I input such GB sized file. Thx
Is string passed by reference in java?
What is class forname used for?
What is generic class?
What is the final method?
What are the differences between heap and stack memory?
Is double bigger than float?
What 4 doubled?