I'm trying to print simple lines of text using nested if statement. but somehow relational symbols return an always false:
//unfinished
import java.util.Scanner;
public class exe6 {
public static void main(String[]args){
Scanner sc = new Scanner(System.in);
System.out.print("Enter your age for verification: ");
int verify = sc.nextInt();
if (verify >= 18){
System.out.println("You are eligible to vote.");
if (verify <= 17) { //always false
System.out.println("Minors are ineligible to vote");
}
}
}
}
I think my brain is not braining and my logic has some problems. please show me the way.