Podcast
Questions and Answers
Which of the following is a valid declaration of a Java array?
Which of the following is a valid declaration of a Java array?
- int[] arr; (correct)
- array arr[];
- arr[] int;
- int arr();
What is the output of the following Java code snippet?
int x = 5;
System.out.println(x++ + ++x);
What is the output of the following Java code snippet? int x = 5; System.out.println(x++ + ++x);
- 11
- 12
- 13 (correct)
- 10
Which keyword is used to prevent a method from being overridden in Java?
Which keyword is used to prevent a method from being overridden in Java?
- final (correct)
- constant
- static
- private