Is there a way to end the program if statement is false?

if (age > 13) {
    System.out.println("You are eligible for this site, you may proceed. ");
}else{
    System.exit(0); 
}

This should end it!

Leave a Comment