Hi all…
I have this question… I have seen many people type this
if (number1 == 100) ? break, number1++;
they say it is to reduce the number of RAM space used compared to this
if(number1 == 100){
break;
}else{
number1++;
}
I just dont understand why is that possible to write the first line and compile it. I tried to use the same line above to make the same effect however they give me an “illegal start of expression” error
Help pls?
public class Fun1{
private int number1;
public void run(){
number1 = 10;
System.out.println(number1);
while(true){
number1++;
System.out.println(number1);
try{
Thread.sleep(50);
if (number1 == 100) ? number1--,number1++;
}catch(InterruptedException e){}
}
}
public static void main(String []args){
new Fun1().run();
}
}

