Java Reference
In-Depth Information
Some of the most useful code templates are listed in the following table, please note
that code templates are case sensitive.
Abbreviation Example expanded text
Description
Psf
public static final
Useful when declaring
public , static , and
final variables.
fore
for (Object object : list) {
Use the enhanced for
loop to iterate through a
collection.
}
ifelse
if (boolVar) {
Generate an if-else
conditional statement.
} else {
}
psvm
public static void
main(String[] args) {
Generate a main method
for our class.
}
soutv
System.out.println("boolVar =
" +
boolVar);
Generate a System.out.
println() statement
displaying the value of a
variable.
trycatch
try {
Generate a try-catch
block.
} catch (Exception exception) {
}
whileit
while (iterator.hasNext()) {
Object object =
iterator.next();
Generate a while loop to
iterate through an iterator.
}
Search WWH ::




Custom Search