1/18
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai |
|---|
No analytics yet
Send a link to your students to track their progress
What is the result of 7 / 2 in Java (int division)?
3
Which is correct for a char in Java?
Char stores a single character in single quotes, like 'A'.
Which data structure is best for fast key lookup?
Hashmap provides very fast lookup by key on average.
What does this.name = name do?
It sets the object’s name variable equal to the value passed in
What is method overloading?
Having multiple methods with the same name but different parameters.
Which scenario best demonstrates inheritance in Java?
One class extends another, like Dog extends Animal.
In which situation is polymorphism being used?
A parent class reference runs a child class methods
What keyword is used to inherit a class in Java?
Extends.
Which OOP pillar hides data using private fields and public methods?
Encapsulation.
Which of the following describes abstraction in Java?
Showing only important details and hiding the rest
What happens if you write void before a constructor?
Not a constructor anymore; it becomes a regular method.
What is the correct Java entry point method?
Public static void main(String[] args).
How do you fix integer division to get a decimal?
7 / 2.0.
What Scanner bug occurs after nextInt()?
The next nextLine() may skip input because of leftover newline
Which access modifier protects class data?
Private.
What does in-order traversal of a BST produce?
Values in sorted order.
What happens if you forget a semicolon in Java?
You will get compile-time error.
What keyword is used to call a parent constructor?
Super.
Which statement correctly declares a variable in Java?
Int x = 5.