Java core class (Type, File)

Download 39.72 Kb.
Hajmi39.72 Kb.
  1   2   3   4   5   6   7   8   9   ...   12
interview questions

1. Class (Type, File)
1. Ways to create a new type/class in java (class, interface, …)
2. ‘Inner’ classes: classification, differences, best practice.
3. A few types in one ‘java’ file: rules of usage, best practice.
4. Naming convention for classes, best practice.
5. Keywords to be used for creating new classes/types.
6. Structure of a new type, possible structural elements.
7. Byte code in java.
8. Structure of a file with extension ‘.class’.
2. Usage of Static and non static Blocks in a Class
1. Why static and non static blocks were introduced in Java?
2. Life cycle of static and non static blocks.
3. Static and non static blocks and inheritance: rules of initialization static and non static blocks between parent and children.
4. Usage of static blocks and best practice.
5. Non static blocks: usage, best practice.
3. Classloader (Hierarchy: Bootstrap, Extensions, System, User-defined…)
1. What is the mechanism of classloading?
2. Default hierarchy of classloaders.
3. What is the role of every element in hierarchy?
4. Why don’t use only one or two classloaders?
5. Life cycle of a ‘class’ when it is loaded by classloaders.
6. Stages of class construction.
7. User-defined classloader. Why and when we need it? Best practice.
8. Library Version Conflicts and how classloaders resolve it.
9. A possibility to load different versions of the same libs.
10. Types of Exceptions are thrown by classloading mechanism.
4. Abstraction
1. What is an Abstraction?
2. Maintaining/ Achieving abstraction in java, best practice.
5. Polymorphism
1. Description of the essence of the idea.
2. What are the types of it?
3. Implementation and support of ‘Polymorphism’ in Java.
4. Polymorphism and data members in Java.
5. Overloading and overriding methods.
6. What is run time and compile time polymorphism?
7. Polymorphism and best practice in Java.
8. Possibility to override static methods in Java.
6. Inheritance
1. What is inheritance?
2. Inheritance in java, supported types.
3. Ways to use inheritance in java.
4. Difference between inheritance and abstraction.
5. Polymorphism and inheritance differences.
6. Composition vs inheritanbce.

Download 39.72 Kb.

Do'stlaringiz bilan baham:
  1   2   3   4   5   6   7   8   9   ...   12

Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan © 2023
ma'muriyatiga murojaat qiling