We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
She is right! I am misspell the "teenager" and my code is broke. try this:
public void amIOld() {
if(age<13){
System.out.println("You are young.");
}else if(age>=13 && age<18){
System.out.println("You are a teenager.");
}else{
System.out.println("You are old.");
}
}
Day 4: Class vs. Instance
You are viewing a single comment's thread. Return to all comments →
She is right! I am misspell the "teenager" and my code is broke. try this:
public void amIOld() { if(age<13){ System.out.println("You are young."); }else if(age>=13 && age<18){ System.out.println("You are a teenager."); }else{ System.out.println("You are old."); } }