Well I'm totally new to java so I may be posting stupid/easy to find questions, but could someone please tell me why this happens?
Ok so this is my code :
int age = 50 System.out.println(age == 50 ? "Your 50" : "Your not 50");
This code even when age is 50 it says "Your not 50"...It's always "Your not 50"...
What I want to do is : I want when I change the age variable to change the output to either "your 50" (if age is 50) or "Your not 50"(if age isn't 50)
Is it completely mistake?


LinkBack URL
About LinkBacks
Reply With Quote
