Can anyone know what mistake I am doing

package com.codegym.task.task04.task0427;
/*
Describing numbers
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
BufferedReader r = new BufferedReader(new InputStreamReader (System.in));
String a = r.readLine();
int a1 = Integer.parseInt(a);
if(a1<10 && a1 % 2 == 0){
System.out.println("even single-digit number");
}
else if(a1<10 && a1 % 2 != 0){
System.out.println("odd single-digit number");
}
else if(a1>9 && a1 % 2 == 0 && a1<100){
System.out.println("even two-digit number");
}
else if(a1>9 && a1 % 2 != 0 && a1<100){
System.out.println("odd two-digit number");
}
else if(a1>99 && a1<=999 && a1 % 2 == 0){
System.out.println("even three-digit number");
}
else if(a1>99 && a1<=999 && a1 % 2 != 0){
System.out.println("odd three-digit number");
}
}
}

&& a1 % 2 != 0){ System.out.println("odd single-digit number"); } Logically ifa1 % 2 == 0is false thena1 % 2 != 0must be true. When you check for them both you are adding work for the CPU to do. -The same thing applies with the numbers, you can do this and it would run faster and be less typing:if-else ifstatements to cover every single option of output This method has a minimum of 2 boolean checks for a even single number, and a max of 9 with an odd three digit. #2 a couple if-else statements to build the correct output: This method has a min of 2 for even/odd single number and a max of 4 for an even/odd three digit number. This is my preferred method, less typing and less boolean (true/false) checks. The less work the computer has to do the better. This code won't pass because I didn't solve how to make sure that the entered number is between 1-999. I just wanted to use an example. I will let you figure out how to implement that last bit.