What is the correct way to declare a constant in Java?
Which statement about constructor overloading is true?
Which of the following is a valid variable declaration?
What is the output of: System.out.println(5 % 2 + 3 * 2 - 1);?
Which of the following about static variables is incorrect?
Advertisement
What is the result of: int x = 5; System.out.println(x++ + ++x);?
Which of the following cannot be inherited in Java?
What does the 'super' keyword do in Java?
Consider: class A { static int x = 5; } How many times is x initialized when you create multiple A objects?
Which statement about Java's garbage collection is true?
What is the purpose of the 'instanceof' operator?
What will be the output of: System.out.println(310);
Consider the code: int x = 5; x += 3; What is the value of x?
Which of the following is a valid method name in Java?
What is the scope of a variable declared inside a method in Java?
Which of the following will result in a compilation error? class Test { public void method1() { } public void method1(int x) { } }
What is the output of: System.out.println(true && false || true);
Which statement about method parameters is correct?
What is the difference between == and equals() in Java?
Consider: String s1 = "Java"; String s2 = new String("Java"); System.out.println(s1 == s2);