blob: 3ecce635e0e568d0ba84d02af164b9cedc90c18f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
class Ship implements Vehicle
{
public boolean isInSpace;
public void go()
{
if (isInSpace)
System.out.println("Flying (this is a space ship)!");
else
System.out.println("Sailing!");
}
}
|