Class:-
- Class is a java keyword
- Class is a template
Class is logical entity
Class name First letter should be the capital letter
Eg. StudentNameClass name should allow only these special characters like ($ & _)..( starting, intermediate and last)
Class name should allows only numeric value like ( intermediate and last)
Syntax:
Class BikeShowroom
{
Code
}
OBJECT
- Object is a State and Behaviour
- Object is physical entity
- Object is used to store State and behaviour
Syntax
BikeShowroom ref = new BikeShowroom();
- New is a keyword of java
If we create a object, jvm will allocate a memory in heap at runtime
Top comments (0)