Introduction
Here is the source code for MainClass.java
Source
public class MainClass {
public static void main(String[] args) {
System.out.println(validateZip("123456"));
}
// validate zip
public static boolean validateZip(String zip) {
return zip.matches("\\d{5}");
}
}