View Single Post
  #1 (permalink)  
Old 08-02-2007, 04:01 PM
boy22 boy22 is offline
Member
 
Join Date: Jul 2007
Posts: 36
boy22 is on a distinguished road
problem with a simple java code
I'm doing a simple java program, when I try to compile it, the eclipse says that age isn't initialized
this is my code, please check it out
Code:
public class First { public void calculate() { int age; if(age!= 0) { System.out.println(age) } else { System.out.println("you can't enter 0 as age") } }
Reply With Quote
Sponsored Links