diff --git a/OOP/Java/Lab/Week7/MIT.java b/OOP/Java/Lab/Week7/MIT.java new file mode 100644 index 0000000..91beac5 --- /dev/null +++ b/OOP/Java/Lab/Week7/MIT.java @@ -0,0 +1,28 @@ +class MIT { + + class Student_Detail { + + String name; + int id; + String college_name; + + Student_Detail(String name, int id) { + this.name = name; + this.id = id; + this.college_name = "MIT"; + } + + void display_details() { + System.out.println("Name: " + name); + System.out.println("ID: " + id); + System.out.println("College: " + college_name); + } + } + + public static void main(String[] args) { + MIT mit = new MIT(); + MIT.Student_Detail student = + mit.new Student_Detail("Sherlock Holmes", 230953344); + student.display_details(); + } +}