Professional Documents
Culture Documents
CS403 643d98fc2e3a0
CS403 643d98fc2e3a0
part one
Grade 2
Contents …
Class
Static
Non- static
Constructor
Default constructor
Constructor overload
Constructor override
Object
Class
A Java class file is a file containing Java bytecode that can be executed on the
Java Virtual Machine
Examples
Access-modifier class name {
}
Static
Non-static methods are those that do not have the static keyword before the method
name. Like non-static variables,
non-static methods also should be call only using object.
Example
Int a=0;
}
Constructor override
Constructor overloading in Java refers to the use of more than one constructor in an
instance class.
Object
Encapsulation
Inheritance
Polymorphism
Abstraction