Class
*Class is a java keyword
*Class is a template
*Class is logical entity
*First letter of the class name should be in capital(camel notation)
Eg. SalaryAccount
*also in class name we can use the following special chars $, &, _.
*use the numerical values only in the intermediate and last of the class name
Syntax:
Class BankDetails
{
Code
}
OBJECT
*Object is a State and Behaviour
*Object is physical entity
*Object is used to store State and behaviour
Syntax
BankDetails ref = new BankDetails();
*new is a keyword of java
*If we create a object, jvm will allocate a memory in heap memory at runtime
Top comments (0)