For this Question: Given two integers N and D, your task is to find the numbers between 1 to N which contains the digit D at least 1 time.Input contains only two integers N and D.

Constraints:-
1 < = N < = 100000
1 < = D < = 9Print all the numbers from 1 to N which contains the digit D in it separated by space in non decreasing order.Sample Input:-
20 5

Sample Output:-
5 15

Sample Input:-
15 1

Sample Output:-
1 10 11 12 13 14 15, I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
	public static void main (String[] args) {

				Scanner sc=new Scanner(System.in);
				int n=sc.nextInt();
				int d=sc.nextInt();
				printnumber(n,d);
	}
				static boolean ispresent(int n,int d){
				while(n>0){
					if(n%10==d)
					break;

						n=n / 10;
				}
					return n>0;
				}
				static void printnumber(int n,int d){
				for(int i=0;i<=n;i++){
					if(i==d||ispresent(i,d)){
						System.out.print(i+" ");
					}
				}
				}


}, In this Programming Language: Java, Now tell me if this Code is compilable or not?