()
| 44 | subject = sc.next(); |
| 45 | } |
| 46 | void display() { |
| 47 | System.out.println("Displaying teacher details: "); |
| 48 | System.out.println("Name: " + name); |
| 49 | System.out.println("ID: " + id); |
| 50 | System.out.println("Years of experience: " + expYears); |
| 51 | System.out.println("Subject taught: " + subject); |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | public class EduInstitute { |