Question 1: -Explain public static void main(String[] arg)
public: - public is an access modifier, which means that this method is accessible
by any class.
Static: - static keyword tells that this method can be accessed without creating an instance
of the class.
Void: - this main method returns no value.
Main:
- it is the name of java's main method.
String
arg[]: - The arg is an array of string types. This contains the command line
argument that we can pass while running the program.
Question 2:-What is an object and class?
Object:
- An object is an instance of a class.
Class:
- A class is a template or blueprint from which objects are created.
Question 3: - What is static in java?
The static keyword is a
non-access modifier used for methods, class variables, and attributes.
The static keyword in java is used for memory
management mainly.
Question 4: - What do you mean by the constructor?
Constructor:- Constructor is a special type of method whose name is the same as a class name. Constructor is called when an instance of the class is created
Questions 6:- Why create a constructor. The main purpose of Constructor?
The purpose of a constructor is to perform initialize the object of a class.
Question 7:- What is different between final finalize and finally?
Final:- Final is used to apply restrictions on class, method, and variable. a final method can not be overridden and the final class can not be inherited. and also final variable's value can not be changed.
Question 8: - What is array and ArrayList?
Question 9: - What is the platform?
Ans:- Platform is a software and hardware programs that runs any machine.
Question 10:- What is abstract class?
Question 11:- What are the differences between C++ and Java?
Questions 12: - Why java is platform independent ?
Questions 13: - Which class is a superclass of all classes?
Questions 14:- What is a JIT compiler ?




