How to check if a number is less than 9 in java

import java.util.Scanner;
public class IfLessNine {
	public static void main (String arg[]){
		Scanner xScanner=new Scanner(System.in);
		int number;
		System.out.print("Please enter a number: ");
		number=xScanner.nextInt();
		if (number<9){
			System.out.println("Yes");
		}
		else {
			System.out.println("No");
		}
		xScanner.close();

	}

}