Concepts of Classes Objects Methods in Object Oriented Java Programming
You will learn Object Oriented Java programming Concepts.
You will learn what is a class, what is an object, what are methods, how to create and use them, what is their advantages in detail with example.
Student.java
1 package oops;
2
3 public class Student {
4 public String name;
5
6 public void introduce(){
7 System.out.println("Hey i am "+name);
8 }
9 }
Tutorials.java
1 package oops;
2
3 public class Tutorials {
4
5 public static void main(String[] args) {
6
7 Student anil = new Student();
8 anil.name = "Anil";
9 anil.introduce();
10
11 Student mani = new Student();
12 mani.name = "Mani";
13 mani.introduce();
14
15 }
16
17 }