✔ JAVA CHAPTERS:-
1. Introduction to Java
2. Features of Java
3. Java Virtual Machine
4. D/F B/W JVM, JRE, JDK
5. Java Data Types
6. Java Programs
7. Setting Java Path
8. OOPs Concepts
9. Object & Class In Java
10. OOPs Continued
11. Encapsulation & Polymorphism
12. Method Overloading
13. Method Overriding
14. Dynamic Method Dispatch
15. Association In Java
16. Inheritance in Java
17. Aggregation in java
18. Command Line Argument
19. Execute Command Line
20. Read Input From Command Line
21. Abstract Class In Java
22. Interface in Java
23. Cutom Marker Interface
24. Constructor In Java
25. Package in Java
26. Acess Modifier In Java
27. Static Import In Java
28. Package Class In Java
29. This Keyword
30. Instance Intializer Block
31. Super Keyword
32. Static Keyword
33. Final Keyword
1. Introduction to Java
2. Features of Java
3. Java Virtual Machine
4. D/F B/W JVM, JRE, JDK
5. Java Data Types
6. Java Programs
7. Setting Java Path
8. OOPs Concepts
9. Object & Class In Java
10. OOPs Continued
11. Encapsulation & Polymorphism
12. Method Overloading
13. Method Overriding
14. Dynamic Method Dispatch
15. Association In Java
16. Inheritance in Java
17. Aggregation in java
18. Command Line Argument
19. Execute Command Line
20. Read Input From Command Line
21. Abstract Class In Java
22. Interface in Java
23. Cutom Marker Interface
24. Constructor In Java
25. Package in Java
26. Acess Modifier In Java
27. Static Import In Java
28. Package Class In Java
29. This Keyword
30. Instance Intializer Block
31. Super Keyword
32. Static Keyword
33. Final Keyword
Oops Concepts: Previous Next: Oops Continued
Object and Class in Java
Before discussing OOPs concept let us have a brief look at object and class with real world examples.
Object in Real world:
A real world entity. Every real world object/entity has two characteristics state and behavior. Let us take the example of a car. Its state is defined by color, current speed etc and behavior is defined by changing speed, applying breaks etc.
Object in programming:
Like every real world object, software objects also have state and behavior. State of the object is represented by data members or fields and behavior is represented by methods.
Class in Real world:
Let us take the example of cars. There are thousands of cars in existence but all built from the same set of blueprints and therefore contains the same components. In other words your car is an instance (object) and cars is the blueprint (class of objects).
Class in programming:
Class is act as a blue print or template for creating objects. It provides state and behavior for its objects. Java is a pure object oriented language means everything we discuss in java is an object.
Syntax:
access_modifier class class_name{ //body of the class
}
|
Java class has mainly two type of access level:
Default: class objects are accessible only inside the package.
Public: class objects are accessible in code in any package.
Public: class objects are accessible in code in any package.