Skip to content

Commit 60846bb

Browse files
committed
Interface classes added
1 parent cb932bf commit 60846bb

File tree

5 files changed

+66
-0
lines changed

5 files changed

+66
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
eclipse.preferences.version=1
2+
encoding//src/com/concepts/_01oops/InterfaceHandaling.java=UTF-8
270 Bytes
Binary file not shown.
206 Bytes
Binary file not shown.
1.17 KB
Binary file not shown.
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
package com.concepts._01oops;
2+
3+
public class InterfaceHandaling implements Digital
4+
{
5+
6+
7+
public static void main(String[] args)
8+
{
9+
InterfaceHandaling ih = new InterfaceHandaling();
10+
ih.diode();
11+
ih.dNAComputer();
12+
ih.iChip();
13+
ih.registor();
14+
System.out.println(InterfaceHandaling.registorCode);
15+
System.out.println(Analog.registorCode);
16+
System.out.println(ih.registorCode);
17+
18+
}
19+
20+
@Override
21+
public void diode()
22+
{
23+
System.out.println("diode implemented");
24+
25+
}
26+
27+
@Override
28+
public String registor()
29+
{
30+
System.out.println("registor implemented");
31+
return null;
32+
}
33+
34+
@Override
35+
public void iChip()
36+
{
37+
System.out.println("IChip implemented");
38+
39+
}
40+
41+
@Override
42+
public void dNAComputer()
43+
{
44+
System.out.println("DNAComputer implemented");
45+
46+
}
47+
48+
}
49+
50+
interface Analog
51+
{
52+
String registorCode="47 kΩ";
53+
public void diode();
54+
String registor();
55+
}
56+
57+
interface Digital extends Analog
58+
{
59+
// int mirsoprocessor; can't define a variable only final constant be declared
60+
void iChip();
61+
// protected void nanoCircuit(); Only public methods can be declared
62+
public void dNAComputer();
63+
64+
}

0 commit comments

Comments
 (0)