The "Unknown:"s below indicate that an entry is incomplete.
{ ... }(1) | block (grouping statements, especially when statements are not expressions) |
nothing needed | breaking lines (useful when end-of-line and/or indentation has a special meaning) |
/* ... */ | commenting (non nestable) |
// | commenting (until end of line) |
< > <= >= | comparison |
min / max | comparison (min / max (binary or more)) |
compareTo | comparison (returns 3 values (i.e. inferior, equal or superior)) |
/** ... */(2) | documentation comment (non nestable) |
/// | documentation comment (until end of line) |
equals | equality / inequality (deep) |
== != | equality / inequality (shallow) |
System.gc() | force garbage collection |
( ... ) | grouping expressions |
Thread.currentThread().getStackTrace()[1].getLineNumber(); Thread.currentThread().getStackTrace()[1].getFileName(); | information about the current line and file |
case-sensitive | tokens (case-sensitivity (keywords, variable identifiers...)) |
[_a-zA-Z$][_a-zA-Z0-9$]* | tokens (variable identifier regexp) |
CamelCase or camelCase | tokens (what is the standard way for scrunching together multiple words) |
= | variable assignment or declaration (assignment) |
t v | variable assignment or declaration (declaration) |
f(a,b,...) | function call |
f() | function call (with no parameter) |
one can use overloading on different number of arguments | function definition (variable number of arguments) |
return(3) | function return value (breaks the control flow) |
continue / break | breaking control flow (continue / break) |
return(3) | breaking control flow (returning a value) |
try a catch (exn) ... | exception (catching) |
finally | exception (cleanup: code executed before leaving) |
throw | exception (throwing) |
if (c) ... | if_then |
if (c) b1 else b2 | if_then_else |
c ? b1 : b2 | if_then_else |
do ... while (!c) | loop (do something until condition) |
for | loop (for "a la C" (while + initialisation)) |
while (c) ... | loop (while condition do something) |
switch (val) { case v1: ...; break; case v2: case v3: ...; break; default: ...; } | multiple selection (switch) |
; | sequence |
Unknown:
loop (for each value in a numeric range, 1 increment (see also the entries about ranges))
loop (for each value in a numeric range, 1 decrement)
loop (for each value in a numeric range, free increment)
t v | annotation (or variable declaration) |
(t) e | cast (downcast (need runtime checking)) |
(t) e | cast (upcast) |
"final" fields, parameters, local variables(4) | mutability, constness (special cases) |
mutability is the default | mutability, constness (type of a mutable value) |
Unknown:
declaration
mutability, constness (type of a constant value)
super | accessing parent method |
class | class declaration |
this | current instance |
getClass | get the type/class corresponding to an object/instance/value |
class child extends parent | inheritance |
object.method(para) | method invocation |
object.method() | method invocation (with no parameter) |
getMethods | methods available |
o.clone() | object cloning |
new class_name(...) | object creation |
instanceof | testing class membership |
package p; | declare |
attached to each name (public, private...) | declare (selective export) |
import p.* | import (everything into current namespace) |
automatically done(5) | import (package (ie. load the package)) |
import p.name1; import p.name2 | import (selectively) |
. | package scope |
charAt | accessing n-th character |
(char) c | ascii to character |
getNumericValue | character to ascii |
(int) c | character to ascii |
toString | convert something to a string (see also string interpolation) |
"" + e | convert something to a string (see also string interpolation) |
substring | extract a substring |
indexOf | locate a substring |
lastIndexOf | locate a substring (starting at the end) |
simple print (on strings) | |
println(6) | simple print (on strings) |
format | sprintf-like |
+ | string concatenation |
equals | string equality & inequality |
length | string size |
"\n" | strings (end-of-line (without writing the real CR or LF character)) |
"..." | strings (with no interpolation of variables) |
String | type name |
toUpperCase / toLowerCase | upper / lower case character |
toUpperCase / toLowerCase | uppercase / lowercase / capitalized string |
Unknown:
character type name
character "z"
strings (with interpolation of variables)
multi-line
serialize (marshalling)
unserialize (un-marshalling)
false | false value |
! | logical not |
| / & | logical or / and (non short circuit (always evaluates both arguments)) |
|| / && | logical or / and (short circuit) |
true | true value |
boolean | type name |
add | adding an element at the end (side-effect) |
toArray | list out of a bag |
size | list size |
length | list size |
a[i] | list/array indexing |
reverse | reverse |
min / max | smallest / biggest element |
sort(7) | sort |
Unknown:
type name
list concatenation
list flattening
list constructor
adding an element at the beginning (list cons)
adding an element at index
first element
all but the first element
last element
get the first element and remove it
get the last element and remove it
for each element do something
is an element in the list
join a list of strings in a string using a glue string
iterate with index
remove duplicates
get | dictionary (access: read) |
put | dictionary (access: write) |
containsKey | dictionary (has the key ?) |
keySet | dictionary (list of keys) |
values | dictionary (list of values) |
putAll(8) | dictionary (merge) |
remove | dictionary (remove by key) |
HashTable | dictionary (type name) |
enum typ { n1; n2; ... }(9) | enumerated type declaration |
null | optional value (null value) |
v | optional value (value) |
. | record (selector) |
Unknown:
optional value (null coalescing)
record (type declaration)
union type declaration
+ / - / * / / | addition / subtraction / multiplication / division |
& / | / ^ | bitwise operators (and / or / xor) |
~ | bitwise operators (bitwise inversion) |
<< / >> / >>> | bitwise operators (left shift / right shift / unsigned right shift) |
pow | exponentiation (power) |
log | logarithm (base e) |
% | modulo (modulo of -3 / 2 is -1) |
- | negation |
1000., 1E3 | numbers syntax (floating point) |
1000 | numbers syntax (integers) |
mathematical | operator priorities and associativities (addition vs multiplication) |
sqrt / exp / abs | square root / e-exponential / absolute value |
sin / cos / tan | trigonometry (basic) |
/ round / floor / ceil | truncate / round / floor / ceil |
Unknown:
type name
numbers syntax (integers in base 2, octal and hexadecimal)
random (random number)
random (seed the pseudo random generator)
trigonometry (inverse)
logarithm (base 10)
OtherThread.join() | Joining Another Thread (Suspending a thread until another thread completes) |
setPriority(newPriority); | Thread Prioritization (Changing Thead Priority) |
synchronize (this){ ... } | Thread Synchronization (Defining a Synchronized Shared Resource) |
Object_Name.GetMethod() | Thread Synchronization (Synchronized Reading of a Shared Resource) |
Object_Name.SetMethod(Parms) | Thread Synchronization (Synchronized Writing to a shared resource) |
call any public method | passing data directly between threads |
start() / stop()(10) | starting / stopping threads |
class class_name extends Thread {[override run method] } | thread definition |
class_name MyThread = new class_name() | thread object creation |