We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ac5de67 commit 687c085Copy full SHA for 687c085
Interface/NestedInterface2.java
@@ -0,0 +1,27 @@
1
+package Interface;
2
+
3
+class MyClass {
4
+ protected interface NestedInterface {
5
+ String student = "Disha";// needs to be initia;ized as its final
6
7
+ void display(int rollno);
8
+ }
9
+}
10
11
+class MyIface implements MyClass.NestedInterface {
12
+ public void display(int rno) {
13
+ System.out.println("Rollno:" + rno);
14
15
16
17
+/**
18
+ * NestedInterface1
19
+ */
20
+class NestedInterface2 {
21
+ public static void main(String[] args) {
22
+ MyClass.NestedInterface obj = new MyIface();
23
+ System.out.println("Name:" + MyClass.NestedInterface.student);
24
+ obj.display(75);
25
26
27
0 commit comments