Basics - I
Comments
Section titled “Comments”- Single-line comments -
// - Multi-line comments -
/* ... */ - Documentation String -
/** .... */
Keywords
Section titled “Keywords”abstract, continue, for, new, switch assert, default, goto, package, synchronized boolean, do, if, private, this break, double, implements, protected, throw byte, else, import, public, throws case, enum, instanceof, return, transient catch, extends, int, short, try char, final, interface, static, void class, finally, long, strictfp, volatile const, float, native, super, while
Operators
Section titled “Operators”Arithmetic Operators: Perform basic math operations(e.g., +, -, *, /)on numeric operands.Relational Operators: Compare values and return boolean results(e.g., >, <, ==, !=).Logical Operators: Combine boolean expressions(e.g., &&, ||, !)to produce boolean results.Bitwise Operators: Perform operations at the binary level(e.g., &, |, ^)on integer operands.Assignment Operators: Assign values to variables(e.g., =, +=, -=)and perform compound assignments.Conditional (Ternary) Operator: A short-hand if-else operator(e.g., condition ? true-value : false-value)for conditional assignments.
Control Statements
Section titled “Control Statements”- if
- if-else
- if-else-ladder
- ternary
- switch
Looping
Section titled “Looping”- for
- labelled loops i.e
break label1;orcontinue label2; -
for(int i = 0; i < 10; i++) {...}
- labelled loops i.e
- for-each
-
for(var ele: elementList) {...}
-
- while
-
int whileCounter = 1;while (whileCounter <= 50) {...whileCounter++;}
-
- do-while
- break
- continue