-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0189692
commit d65cbff
Showing
11 changed files
with
171 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package samples.inheritance.interfaces.trivial; | ||
|
||
public class TrivialInterface { | ||
public static void main(String[] args) { | ||
Subtraction subtraction = new SubtractionImpl(); | ||
|
||
int one = 100; | ||
int two = 300; | ||
int result = subtraction.sub(one, two); | ||
} | ||
} | ||
|
||
interface Subtraction { | ||
int sub(int first, int second); | ||
} | ||
|
||
class SubtractionImpl implements Subtraction { | ||
@Override | ||
public int sub(int first, int second) { | ||
return first - second; | ||
} | ||
} |
Binary file added
BIN
+169 Bytes
tests/test_data/samples/inheritance/interfaces/trivial/Subtraction.class
Binary file not shown.
Binary file added
BIN
+358 Bytes
tests/test_data/samples/inheritance/interfaces/trivial/SubtractionImpl.class
Binary file not shown.
Binary file added
BIN
+502 Bytes
tests/test_data/samples/inheritance/interfaces/trivial/TrivialInterface.class
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters