Java Class declaration interview Questions


1) What is present version of java and initial version of java?
2) How many modifiers in java and how many keywords in java?
3) What is initial name of java and present name of java?
4) Can we have multiple public classes in single source file?
5) Can we create multiple objects for single class?
6) What do you mean by token and literal?
7) What do you mean by identifier?
8) Is it possible to declare multiple public classes in single source file?
9) What is the difference between editor and IDE(integrated development environment)
10) Write the examples of editor and IDE?
11) Define a class?
12) In java program starts form which method and who is calling that method?
13) What are the commands required for compilation and execution?
14) Can we compile multiple source files at a time and is it possible to execute multiple .classes at a time?
15) The compiler understandable file format and JVM understandable file format?
16) What is the difference between JRE and JDK?
17) What is the difference between path and class path?
18) What is the purpose of environmental variables setup?
19) What do you en by open source software?
20) What are operations done at compilation time and execution time?
21) What is the purpose of JVM?
22) JVM platform dependent or independent?
23) In java program execution starts from?
24) How many types of commands in java and what is the purpose of commands?
25) Is it possible to provide multiple spaces in between two tokens?
26) Class contains how many elements based on Ratan sir class notes?
27) Source file contains how many elements?
28) What are dependent languages and technologies in market on java?
29) Who is generating .class file and .class files generation is based on what?
30) What is .class file contains?
31) What is the purpose of data types and how many data types are present in java?
32) Who is assigning default values to variables?
33) What is the default value of int, char, Boolean, double?
34) Is null is a keyword or not?
35) What do you mean by main class?
36) Is it possible to declare multiple classes with main method?
37) Can I have multiple main methods in single class?
38) What is the default package in java?
39) Can I import same class twice yes-what happened no -why ?
40) Do I need to import java.langpackage ?yes --->why no--->why?
41) Is empty java source file is valid or not?
42) Is it java file contains more than one class?
43) What is the purpose of variables in java?
44) How many types of variables in java and what are those variables?
45) What is the life time of static variables and where these variables are stored?
46) What is the life time of instance variables and where these variables are stored?
47) What is the life time of local variables and where these variables are stored?
48) For the static members when memory is allocated?
49) Where we declared local variables & instance variables & static variables
50) For the instance members when memory is allocated?
51) For the local variables when memory is allocated?
52) What is the difference between instance variables and static variables?
53) Can we declare instance variables inside the instance methods and static variables inside the static method?
54) If the local variables of methods and class instance variables having same names at that situation how we are represent local variables and how are representing instance variable?
55) What do you mean by method signature?
56) What do you mean by method implementation?
57) How many types of methods in java and how many types of areas in java?
58) What is the purpose of template method?
59) Can we have inner methods in java?
60) One method is able to call how many methods at time?
61) For java methods return type is mandatory or optional?
62) Who will create and destroy stack memory in java?
63) When we will get stackoverFlowError?
64) Is it possible to declare return statement any statement of the method or any specific rule is there?
65) When we will get “variable might not have been initialized” error message?
66) What are the coding conventions of classes and interfaces?
67) What are the coding conventions of methods and variables?
68) What is the default package in java programming?
69) Platform dependent vs platform independent?
70) Is java a object oriented programming language?
71) By using which keyword we are creating object in java?
72) Object creation syntax contains how many parts?
73) How many types of constructors in java?
74) How one constructor is calling another constructor? One constructor is able to call how many constructors at time?
75) What do you mean by instantiation?
76) What is the difference between object instantiation and object initialization?
77) How many ways to create a object in java?
78) What is the purpose of this keyword?
79) Is it possible to use this keyword inside static area?
80) What is the need of converting local variables to instance variables?
81) Is it possible to convert instance variables to local variables yeshow no-why?
82) When we will get compilation error like “call to this must be first statement in constructor”?
83) When we will get compilation error line “cannot find symbol”?
84) What do u mean by operator overloading, is it java supporting operator overloading concept?
85) What is the purpose of scanner class and it is present in which package and introduced in which version?
86) What do you mean by constructor?
87) Who is generating default constructor and at what time?
88) What is the difference between named object and nameless object and write the syntax ?
89) What is object and what is relationship between class and Object?
90) Is it possible to execute default constructor and user defined constructor time?
91) If we are creating object by using new operator at that situation for every object creation how many constructors are executed?
92) What do you mean by object delegation?
93) What is the purpose of instance blocks when it will execute?
94) Inside class it is possible to declare how many instance blocks and what is syntax?
95) What is execution flow of method VS constructor Vs instance blocks Vs static blocks?
96) When instance blocks and static blocks are executed?
97) What are the new features of java1.5 version VS java1.6 VS java 1.7 VS java 8?

Comments

Popular posts from this blog

Exception Handling

Multithreading Interview Question for Fresher and Experienced

Collections Framework Interview Questions for Fresher and Experienced