Thread: java help
View Single Post
 
Reply
Posted 2009-05-11, 08:24 AM in reply to osmoses-jones's post "java help"
osmoses-jones said:
if (ages < 18){

System.out.println("you are too young to drive");
What country you from?

Well I am no programmer so my help might be useless. Try structuring it differently...
Code:
x = "drink"
y = "drive"
z = "retire"

if (ages < 18)
System.out.println("You cannot 'x', 'y', or 'z'. ");

}else if (ages >= 21){

System .out.println("You can 'x', 'y', but cannot 'z'. ");

}else if (ages >= 65){
System.out.println("You can 'x' 'y' and 'z'");
All the rest of the technicalities of the programming language I know nothing about, but that is the way I would structure it I guess.
Old
Profile PM WWW Search
Sum Yung Guy seldom sees opportunities until they cease to beSum Yung Guy seldom sees opportunities until they cease to beSum Yung Guy seldom sees opportunities until they cease to beSum Yung Guy seldom sees opportunities until they cease to be
 
 
Sum Yung Guy