Latest Update Already Passed
What keyword is used to create a subclass in Java?
✔✔ extends
How do you define a constant variable in Java?
✔✔ Use the `final` keyword
Which method is automatically called when an object is created?
✔✔ Constructor
What will `System.out.println();` print in Java?
✔✔ 3
How do you handle exceptions in Java?
✔✔ Using try-catch blocks
1
,What keyword is used to prevent method overriding?
✔✔ final
How do you stop a loop immediately in Java?
✔✔ break
Which Java collection does not allow duplicate values?
✔✔ HashSet
How do you check if two strings are equal in Java?
✔✔ Using `equals()` method
What is the entry point of a Java application?
✔✔ `public static void main(String[] args)`
How do you create an object in Java?
✔✔ Using `new` keyword
2
, Which operator is used to compare two values in Java?
✔✔ ==
How do you get the length of an array in Java?
✔✔ Using `array.length`
What is the parent class of all Java classes?
✔✔ Object
Which loop ensures execution at least once?
✔✔ do-while
How do you declare an interface in Java?
✔✔ Using `interface` keyword
What is used to read user input in Java?
✔✔ Scanner class
3