1. Basics of Java
Chapter 1 contains the basic introduction to the Java language such as
- What is Java?
- History and Features of Java
- C++ vs Java
- Hello Java Program
- Internal How to set the path?
- JDK, JRE, and JVM (Java Virtual Machine)
- JVM Memory Management
- Internal details of JVM
- Unicode System,
- Operators
- Keywords
- Control Statements like if-else, switch, for loop, while loop, etc.
2. Class, Object, and Types of Classes
Chapter 2 deals with the most important and core concepts of Java. They are:
- Naming convention of Java
- Classes, Objects, and Features. It explains how to declare a class, how to create an object in Java.
- Object declaration and initialization
- Life cycle of an object
- Anonymous object in Java
3. Packages in Java
- How to declare a package.
- Package naming conventions
- Sub packages
- Types of packages, such as user-defined packages, built-in packages
- Importing packages in Java
4. Data types in Java
- Data types in Java
- Primitive data types
- Non-primitive data types
- Memory allocation of primitive and non-primitive data types, etc.
5. Variables, Constants, and Literals
- Variable declaration & initialization
- Naming convention
- Types of variables such as local variables, instance variables, and static variables
- Scope and memory allocation of variables.
6. Methods in Java
- What is a method in Java
- Use of method in Java
- Method declaration, method signature
- Types of methods in Java: predefined method, user-defined methods: instance method, static method
- Calling of method
- Java main method
- Return type
7. Constructor in Java
- What is Constructor in Java?
- Types of constructors: Default and Parameterized constructors
- Java constructor overloading
- Constructor chaining in java
- Copy constructor in Java
8. Modifiers in Java
- What is Access modifier and Non-access modifier in Java?
- Types of access modifiers like private, default, protected, and public
- Types of non-access modifiers like abstract, final, native, static, Strictfp, synchronized modifier, transient, volatile.
9. Static Keyword
- What is static keyword?
- Static variable
- Static method
- Static initialization block
- Instance initialization block
- Static nested class
- Difference between static variable and instance variable, static method and instance method, static block, and instance block.
10. Final Keyword
- Final keyword
- Final variable
- Final method
- Final class
11. Inner Class in Java
- What is Inner class in Java?
- Properties of inner class
- Instantiating inner class.
- Types of inner class in Java: normal inner class, method local inner class, anonymous inner class, and static nested class
12. Super and this Keyword
- Super keyword
- Calling of superclass instance variable
- Superclass constructor
- Superclass method.
The second section deals with
- This keyword
- Calling of current class constructor, and method
- Difference between super and this
13. OOPs concepts
In this chapter, you will learn the most important topic Object-oriented programming system (OOPs). In the OOPs concept, you will learn class, object, encapsulation, inheritance, polymorphism, and abstraction. All topics are very important for interview purposes.
14. Encapsulation
- Encapsulation in Java
- How to achieve Encapsulation
- Data hiding
- Tightly encapsulated class
- Getter and setter method in Java
- Naming convention of getter and setter method
15. Inheritance
- Inheritance in Java
- Is-A Relationship
- Aggregation and Composition (HAS-A)
- Types of inheritance: single level, multilevel, hierarchical, multiple, and hybrid inheritance
16. Polymorphism
- Polymorphism in Java
- Types of polymorphism: Compile-time polymorphism and Run-time polymorphism
- Static and Dynamic Binding
- Method overloading
- Method overriding
- Rules of method overloading and method overriding, various example programs related to rules of overloading and overriding.
- Covariant Return type
17. Abstraction
- Abstraction in Java
- Abstract class
- Abstract method
- Interface in Java
- Nested interface, rules, and example programs.
18. Garbage Collection
This chapter deals with garbage collection in Java.
19. Input Output Stream
- FileOutputStream, FileInputStream
- BufferedOutputStream, BufferedInputStream
- SequenceInputStream
- ByteArrayOutputStream, ByteArrayInputStream
- DataOutputStream, DataInputStream
- Java FilterOutputStream, Java FilterInputStream
- Java ObjectStream, Java ObjectStreamField
- Console
- FilePermissionWriter, Reader, FileWriter, FileReader
- BufferedWriter, BufferedReader
- CharArrayReader, CharArrayWriter
- PrintStream, PrintWriter
- OutputStreamWriter, InputStreamReader
- PushbackInputStream, PushbackReader
- StringWriter, StringReader
- PipedWriter, PipedReader
- FilterWriter, FilterReader, File FileDescriptor, RandomAccessFile, and java.util.Scanner.
20. Exception Handling in Java
- Exception handling in Java
- Try-catch block
- Multiple catch block
- Nested try block
- Finally block
- Throw keyword
- Throws keyword
- Throw vs Throws, Final vs Finally vs Finalize
- Exception handling with method overriding
- Java custom exceptions
- Throwable class
- Errors
- Example Programs based on the above topics
21. Java Array
- Java Array
- Types of array: single dimensional array, multidimensional array, declaration, instantiation, and initialization of Java array
- Passing array to a method
- Anonymous array
- Cloning an array
22. String, String Buffer, String Builder
- String
- Immutable String
- String Comparision
- String concatenation
- Substring
- StringBuffer class
- StringBuilder class
- toString method
- StringTokenizer class
23. Java Thread
- What is thread in Java?
- Java multithreading
- Multithreading
- life cycle of a thread creating
- Thread scheduler
- Sleeping a thread, Start a thread twice
- Calling run() method
- Joining a thread
- Naming a thread
- Thread priority,
- Daemon thread
- Thread pool
- Thread group
- Shutdownhook
- Java Synchronization: synchronized method, synchronized block, static synchronization
- Deadlock
- Inter-thread Communication
- Interrupting Thread