Following code fragment is given (Java 5): 1: class Human { Which of the following methods would compile if inserted at line 8 | | ||||||||||||||||||||
|
9 mar 2010
Overriding i overloading
Try catch finally
A try block can be followed either by a catch block or a finally block, or both.
A catch block must always be associated with a try block.
A finally block can never stand on its own (that is, without being associated with try block).
Haczyki v2
if(20%4){} //zonk bo wynikiem jest int!!
String s = null; /* Nie bedzie NullPointerException!!!!!!!!!*/
String result = s != null && s.equals("test") ? "yes" : "no";
- Kwestia || i | w jednym ifie + kwsestia && i & w jednym ifie
- Jeśli casy w switchu się powtórzą to! => compilation error!!!!!!!!!
Subskrybuj:
Posty (Atom)