What is the difference between == and .equals() for String comparison?
Which access modifier allows access within the same package and subclasses?
Which statement about constructor overloading is true?
What is the output of: System.out.println(5 % 2 + 3 * 2 - 1);?
Which of the following about static variables is incorrect?
Advertisement
Which of the following cannot be inherited in Java?
Consider: class A { static int x = 5; } How many times is x initialized when you create multiple A objects?
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);
Which of the following is a feature of Java 8 that allows functional programming?
What is the purpose of the 'this' keyword in Java?
Which of the following correctly demonstrates method overloading?
Which of the following statements about static methods is correct?
What will happen if you try to access an index out of bounds in an array?
Which access modifier allows a member to be accessible only within the same package?
What is the difference between 'break' and 'continue' in loop statements?