public class ILoveTernary{
public static void main(String[] args) {
java.lang.System.out.println("The answer is: " + test());
}
public static int test() {
if (FALSE); return
MAMA ?!
PAPA ?!
SWITCH ?
CASE_1: System.err.println +
CASE_2: System.out.println *
CASE_3: System.exit ;
}
static boolean FALSE, SWITCH, MAMA = true, PAPA = true;
static int X = 10;
static int CASE_1 = 1;
static int CASE_2 = 2;
static int CASE_3 = 6;
static class System {
static class err { static int println = 1; }
static class out { static int println = 7; }
static int exit = 3;
}
}
Qual a saida?
Qual a saida?
6 Respostas
Voooooooodoooooooo!

Olá
Se importa se der uma ajeitadinha no código que retorna System.out.println * CASE_3?
public class ILoveTernary2{
public static void main(String[] args) {
java.lang.System.out.println("The answer is: " + test());
}
public static int test() {
if (FALSE);
int nao_interessa = (!SWITCH ? CASE_1: System.err.println + CASE_2);
return (MAMA ? (!PAPA ? nao_interessa : System.out.println * CASE_3) : System.exit) ;
}
static boolean FALSE, SWITCH, MAMA = true, PAPA = true;
static int X = 10;
static int CASE_1 = 1;
static int CASE_2 = 2;
static int CASE_3 = 6;
static class System {
static class err { static int println = 1; }
static class out { static int println = 7; }
static int exit = 3;
}
}
Estraguei o brinquedo?
[]s
Luca
Q troço é esse…!!! :shock: :shock: :shock: :shock: rsssssss
huahua credo que bizarro … demorei 20min pra entender hehe
I
Vixe, acho que nem vou tentar, agora que cheguei na parte do livro que trata do CASE. :shock:
Mas esse povo ta mole hein hehehe 
Criado 12 de fevereiro de 2004
Ultima resposta 14 de fev. de 2004
Respostas 6
Participantes 6