Variables and Data Types
Variables: Containers to store data values.
Data Types: Specify the type of data that a variable can hold.
Primitive Data Types: byte, short, int, long, float, double, char, boolean.
Non-primitive Data Types: Strings, arrays, and objects.
Custom-defined Data Types: Created by the user.
Operators and Type Casting
Operators: Symbols that tell the compiler to perform specific mathematical or
logical manipulations.
Type Casting: Convert data from one type to another.
User Input and Scanner Class
Scanner Class: Java standard library class that allows user input.
Functions and Methods
Functions: Reusable pieces of code.
Methods: Functions within a class.
Loops
Loops: Repeat a block of code multiple times.
For Loop: Useful for iterating through a collection of items.
While Loop: Repeat as long as a condition is true.
Do-While Loop: Repeat at least once, then repeat as long as a condition is true.
Conditional Statements
Conditional Statements: Make decisions.
If-else: If a condition is true, execute a block of code.
Switch-case: Execute one of several blocks of code based on the result of a switch
expression.
Note: Memory, arrays and multidimensional arrays, and other miscellaneous topics
are not covered in these notes.