From 8c9a7ba43fffdd12014506db211361c55b5e6e48 Mon Sep 17 00:00:00 2001 From: mahuntington Date: Thu, 22 Oct 2026 14:55:24 -0400 Subject: [PATCH] Update 'README.md' --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 0205bcd..0561ef9 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Intro to Java +## Basic + ```java class HelloWorld{ void main(String[] args){ @@ -8,6 +10,8 @@ class HelloWorld{ } ``` +## Variables + ```java String greeting = "Hello there!"; ``` @@ -21,6 +25,8 @@ int myNewAge = myAge + 2; double myWeight = 144.5; ``` +## Flow of Control + ```java Boolean isCool = false; if(isCool){ @@ -44,11 +50,15 @@ for(int i = 0; i < 5; i++){ } ``` +## Arrays + ```java String[] cars = {"Volvo", "Toyota", "Mazda"}; System.out.println(cars[1]); ``` +## Functions + ```java class HelloWorld{ void printMessage() { @@ -74,6 +84,8 @@ class HelloWorld{ } ``` +## Classes + ```java class Human { String name; @@ -90,6 +102,8 @@ class HelloWorld{ } ``` +## Inheritance + ```java class SuperHuman extends Human { private String power; @@ -113,6 +127,7 @@ class HelloWorld{ } ``` +## Abstract/Interface ```java abstract class Car {