more java @ mlab, 10-17 Jan 2000, juhuu@katastro.fi


tabulators and braces you should always use tabulators to align the lines. opening brace and the closing brace should always be found on the same level. the contents between the braces should have one tab more. example: for ( int i = 0 ; i < 10 ; i++ ) { table[ i ] = a; a = a + b; if ( a > 100 ) { a = 0; b = b + 1; } }
naming the variables you should always a prefix that tells the type of the variable. the recommended prefixes for the most common datatypes are: int n double d long l boolean b byte y String s Image img examples: int nValue; double dValue; String sText;