diff --git a/README.md b/README.md index b6fcc2f..0205bcd 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,6 @@ System.out.println(cars[1]); ```java class HelloWorld{ - void printMessage() { System.out.println("Hi"); } @@ -64,7 +63,6 @@ class HelloWorld{ ```java class HelloWorld{ - int add(int a, int b){ return a + b; } @@ -123,15 +121,15 @@ abstract class Car { System.out.println("screeeeech"); } } + class Sedan extends Car{ void drive(){ System.out.println("vroom"); } } -class HelloWorld{ +class HelloWorld{ void main(String[] args){ - Sedan myCar = new Sedan(); myCar.drive(); myCar.stop(); @@ -143,11 +141,13 @@ class HelloWorld{ interface Bird { void fly(); } + class Swallow implements Bird { public void fly() { System.out.println("sweeeee"); } } + class HelloWorld{ void main(String[] args){ Swallow stewart = new Swallow();