Tous les codes sources "Mais pourquoi ?"page 35
Java
21 Juin, 2014 à 01:18
#172
if((text2.getText()).equals("1234"))
{
server_1 =1;
Server_1 = "correct";
}
else
{
server_1 = 0;
Server_1 = "incorrect";
}
if((text3.getText()).equals("1234"))
{
server_2 =1;
Server_2 = "correct";
}
else
{
server_2 = 0;
Server_2 = "incorrect";
}
Java
18 Juin, 2014 à 11:27
#194
//I once saw a code that was completely riddled with this pattern
try {
component.doSomething();
component.doSomethingElse();
} catch (NullPointerException ex) {
component = new Component();
component.doSomething();
}