Jul 22, 2024
public static void main
methodint
: Integerchar
: Character, single quoteslong
: Long integerdouble
: Double-precision floating pointString
: A sequence of characters, double quotesint
, char
, public
, static
, void
)public static void addExclamationPoint(String s) { ... }
name.toUpperCase()
to convert string to uppercasevoid
for no return valueString
) if there is a returnnew
keyword
Animal a = new Animal();
a.iAmDog()
import
statement to bring in external classes
import java.util.ArrayList;
if (condition) { ... } else { ... }
for (int i = 0; i < 5; i++)
while (condition) { ... }
try { ... } catch (Exception e) { ... }