Core Java Interview Question .
1) What do you mean by Java?
→ Java is an object-oriented computer programming language.
→ It is a high-level programming language developed by James Gosling in Sun Microsystem in 1995
2) Difference between JDK,JRE and JVM ?
3) Explain that public static void main(String args).
public : Public is an access modifier,. Public means declared from anywhere. such as method and class.
static : It is a keyword.that is declare variable class, method.
void : It is the return type of the method. Void does not return any value..
main: main is startup of the program.
String args : It is the parameter passed to the main method. And command line argument.
4) Why Java is platform independent?
→ Platform independent means "write once run anywhere". Java byte codes run on any operating system.
5) .java file name a valid source file name?
→ Yes, you can save .java only,
//compile by javac .java
//run by java A
compile it by javac .java and run by java yourclassname
6) What is Object?
→ Object is real word entity that means every things is object .An object consists of methods and class.
7) What is class in Java?
→ A class is the blueprint from which individual objects are created.
8) Is delete,next,main,exit or null are keyword in java ?
9) If I don't provide any arguments on the command line, then the String array of Main method will be empty or null?
→ It is empty. But not null.
10) Explain public static void main(String args).
11) Why Java is platform independent?
Platform independent means "write once run anywhere" because byte codes can run on any operating system such as window 7, linux, etc.
12) What are wrapper classes?
Wrapper classes converts the java primitives into the objects types . Every primitive data type has a class dedicated to it. These are known as wrapper classes