Jul 12, 2024
public static void main optionint: Integer (e.g., int a = 5;)char: Character (e.g., char b = 'A';)long, double: Other numeric typesString: Sequence of characters (e.g., String name = "Susan";)! to the end of a given stringSystem.out.println for printingtoUpperCase(), toLowerCase() methods available for strings`Animal):
Animal with a method iAmDog() which returns a stringAnimal in the main class and call iAmDog()Animal a = new Animal();ArrayList
import java.util.ArrayList; (for automatic code imports)add(), get(), etc.**if, else if, elseif(a == 5) { ... }for loop
for(int i = 0; i < 5; i++) { ... }for loop inside another for loop)while loop
while(a < 50) { ... a++; }try { ... } catch(Exception e) { ... }