Update 'README.md'

main
mahuntington 3 weeks ago
parent 715a92b3c5
commit 43776c6bfc

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

Loading…
Cancel
Save