File tree Expand file tree Collapse file tree 5 files changed +66
-0
lines changed
Expand file tree Collapse file tree 5 files changed +66
-0
lines changed Original file line number Diff line number Diff line change 1+ eclipse.preferences.version =1
2+ encoding//src/com/concepts/_01oops/InterfaceHandaling.java =UTF-8
Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments