OOP Concepts - Part 01
- JAVA Language -
Class Hierarchy
- Object
- Class
- Method
- Variable
Standards
Class : The first letter is uppercase
example :- Capital
Variable : The first letter is lowercase
example :- capital
Method : The first letter is lowercase and contains the parameter list
example :- capital()
Java print Statement
Assign Operator
String b = "max";
b = "pro";
= :- What the equal sign does is substitute the value on the left side of the equal sign for the variable on the right side of the equal sign.
Equalization Operators
String c == "hey";
== :- The two equal signs make the value on the left equal to the variable on the right.
Scope Identification
Curly brackets{ } are applied only to a class or method.
All codes are placed inside a curly bracket.
Curly bracket is used to indicate the relevant part.
Class & Object
Object
To explain about an Object, let's see it with a simple example.
-----------------------------------------------------------------------------------------
Human
Walk Eat
Smile See
Jump Hear
Write Fight
Behaviors(Function)
-------------------------------------------------------------------
- Anything that has properties and behaviors is called an Object.
Class
Human <-- 8B
Object <-- 8B
đ
đ
đ
Class.
---------------------------------------------------------------------
- In programming, regarding the properties and behavior of an object, an object is used as a Class, while Properties are used as a Variable. and used as behaviors and methods.
- Just like the properties and behaviors of the object, the variables and methods of the class are used.
- That is, a class is a template created for an object.
- A class can implement any objects by changing only the value.
- See You in Part 2 -
đFollow Me :-
Blog :- devindawanasinghe.blogspot.com
Facebook :- devindawanasinghe.facebook.com
YouTube :- devindawanasinghe.youtube.com
Twitter :- devindawanasinghe.twitter.com
TikTok :- devindawanasinghe.tiktok.com
Comments
Post a Comment