My code does not work
3 comments
Hi, this site unfortunately is not meant for discussing code issues such as this. Maybe you could hit up www.stackoverflow.com, and try there.
Your description doesn't really seem to match your code. This is probably the code you describe:
private static boolean Match(int age, int year)
{
return year == age*age;
}public boolean CmpSquareOfAgeToYear(int age, int year) {
if(age * age == year) {
return true;
} else {
return false;
}
}
public class Augustus { private int year; private final static int RANGEOFLIVING=124; public static void main(String[] args) { Augustus y = new Augustus(1806); System.out.println( y.isAlive());
} public Augustus(int n){ year= n;
}