Skip to content

Commit

Permalink
Polymorphism code bugs fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
mdyasinahmed committed Jul 10, 2023
1 parent cc62432 commit bff5186
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
5 changes: 0 additions & 5 deletions src/OOPS/polimorphism/tempCodeRunnerFile.java

This file was deleted.

Binary file added src/OOPS/polymorphism/Polymorphism.class
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ public void printInfo(String name, int age){
}
}

public static void main(String args[]){
Student s1 = new Student;
s1.name = "aman";
s1.age = 24;
public class Polymorphism{
public static void main(String args[]){
Student s1 = new Student();
s1.name = "aman";
s1.age = 24;

s1.printInfo(s1.name. s1.age);
s1.printInfo(s1.name, s1.age);
}
}
Binary file added src/OOPS/polymorphism/Student.class
Binary file not shown.

0 comments on commit bff5186

Please sign in to comment.