Java language is object oriented programming language. We can also call OOP. Class Object Methods will help to give MVC structure to our programs.
Let’s understand basic concepts of class.
- class is keyword in java language
- class is collection of methods and variable
- one class can share its properties with other class using relation
- We can customize our classes in different packages and manage from one location.
Let’s understand basic concepts of object
- Object can store memory of variables and manage variables and methods of class.
- Object can assign to reference and create clone object.
Let’s understand concepts of methods
- Methods define in class.
- Using of object we can handle methods.
Let’s see simple structure of Class Object Methods in Example.
class A // Class
void method() // method in class
// Do your programs…
public static void main(String args)
A obj = new A(); // Create obj as object
obj.method(); // calling
This is basic structure of class programs.
|class A||:||Simple Class|
|void method()||:||Class’s Method|
|class clEx||:||Main Class|
|A obj = new A();||:||Process, to create an object|
|obj.method();||:||Call to method() in class A|
If you have query about this blog, you can directly post comment or subscribe on website.
839total visits,2visits today