What Java Keyword is used to create a new instance of a class?
What is "new"
What data type is used to store whole numbers like 50 and 90?
Int
The building block of object-oriented programming
Class
What is an object?
An instance of a class
which type of comment is used for single-line explanation?
Single-line comment
What is the keyword used to implement conditional branching in code?
What is "if, else, else if, and switch"
What data type is used to store decimal numbers like 5.75?
Double
A special method that is automatically called when an instance of the class is created
Constructor
What term is used for the blueprint or template for creating objects in Java?
A class
Which type of comment is used for multi-line explanations?
A multi-line comment
What is the difference between public and private in Java?
Public being least restrictive and Private being the most restrictive.
What data type is used to represent a single character?
Char
What does an instance variable inside a class do?
Stores the attributes of an object
What are the two components of an object ?
Attributes and Behavior
Main method
What is the purpose of the "main" method in a Java program?
To serve as the entry point for the programs execution
Boolean
What keyword is used to create a new instance of a class?
New
Can you instantiate an abstract class?
No
What is the purpose of commenting code in Java?
Make code more readable, helps debugging, understand the code.
What is the difference between an Interface and an abstract class in Java?
Interface can only declare abstract methods and have no implementation, while abstract classes can have some concrete methods.
What data type is used to represent text ?
String
Abstract
What keyword is used to create a new instance of a class?
new
What is the purpose of return statement?
To specify the value that the method should return when called