mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00:00
Fix conflicts from merge with master
This commit is contained in:
parent
fc3c56ee93
commit
1caa042526
@ -489,17 +489,8 @@ public interface Digestible {
|
|||||||
|
|
||||||
// We can now create a class that implements both of these interfaces.
|
// We can now create a class that implements both of these interfaces.
|
||||||
public class Fruit implements Edible, Digestible {
|
public class Fruit implements Edible, Digestible {
|
||||||
@Override
|
|
||||||
<<<<<<< HEAD
|
|
||||||
public void eat() {
|
|
||||||
// awesome code goes here
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void digest() {
|
|
||||||
// awesome code goes here
|
|
||||||
}
|
|
||||||
=======
|
|
||||||
public void eat() {
|
public void eat() {
|
||||||
// ...
|
// ...
|
||||||
}
|
}
|
||||||
@ -508,31 +499,21 @@ public class Fruit implements Edible, Digestible {
|
|||||||
public void digest() {
|
public void digest() {
|
||||||
// ...
|
// ...
|
||||||
}
|
}
|
||||||
>>>>>>> adambard/master
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// In Java, you can extend only one class, but you can implement many
|
// In Java, you can extend only one class, but you can implement many
|
||||||
// interfaces. For example:
|
// interfaces. For example:
|
||||||
public class ExampleClass extends ExampleClassParent implements InterfaceOne,
|
public class ExampleClass extends ExampleClassParent implements InterfaceOne,
|
||||||
InterfaceTwo {
|
InterfaceTwo {
|
||||||
@Override
|
|
||||||
<<<<<<< HEAD
|
|
||||||
public void InterfaceOneMethod() {
|
|
||||||
// awesome code goes here
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void InterfaceTwoMethod() {
|
|
||||||
// awesome code goes here
|
|
||||||
}
|
|
||||||
=======
|
|
||||||
public void InterfaceOneMethod() {
|
public void InterfaceOneMethod() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void InterfaceTwoMethod() {
|
public void InterfaceTwoMethod() {
|
||||||
}
|
}
|
||||||
>>>>>>> adambard/master
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Abstract Classes
|
// Abstract Classes
|
||||||
|
Loading…
Reference in New Issue
Block a user