Skip to content

Commit

Permalink
new class added
Browse files Browse the repository at this point in the history
  • Loading branch information
mdyasinahmed committed Jul 9, 2023
1 parent d987505 commit eb486d8
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/OOPS/OOPS.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ public void printType(){
}
}

class Student{
String name;
int age;

public void printInfo(){
System.out.println(this.name);
System.out.println(this.age);
}
}

// Creating Object
public class OOPS{
public static void main(String args[]){
Expand All @@ -32,6 +42,10 @@ public static void main(String args[]){

pen1.printColor();
pen2.printColor();




}
}

Expand Down

0 comments on commit eb486d8

Please sign in to comment.