Overview:
Let us discuss about object, class in java and the errors of program.
What is an Object in Java?
The following concepts of the java objects:
- It is an example of a class.
- It is a real entity that occupies the memory.
- An object must have a unique identity
- An object can have different states and behaviors.
- States represent the individual properties of that object and can be stored in the fields/variables.
- Object behavior can be described by the operations/actions that an object can conduct.
- If a class has multiple objects, then all the objects can share the same behaviors and states.
- An object is a physical entity.
- The objects are created at run time.
What is class?
A class is a user defined blueprint or prototype or template from which objects are created. It represents the set of properties or methods that are common to all objects of one type.
Example:
1. Mathematics formulas are class .The problem (real time problem) solved by formulas(class) are object.
2.college – class. Student ,teacher etc., – object.
Reference:
https://www.javatpoint.com/object-and-class-in-java
https://linuxhint.com/java-objects/
https://www.geeksforgeeks.org/classes-objects-java/
Errors:
- { – missing


2.[] – missing


3. ; – missing


4. public – c removed


5. , – missing


6. ( -missing


7. void -remove


8. ” – missing


9. No gap between void main


10. out removed


Leave a comment