Java program to check whether a number is duck number or not

NOTE:-A Number is said to be duck number when there's a zero in number. Ex:- 2014 import java.…