|
-
July 28th, 2012, 08:33 AM
#1
Java program on netbeans (Validating Postcodes)
In general, the UK postcode format is one of "A9 9AA", "A99 9AA", "AA9 9AA", "AA99 9AA", "A9A 9AA" or "AA9A 9AA", where A is an alphabetic character and 9 is a numeric character.
Write a Java program to validate postcode input for each of these formats.
Code:
public class ValidatingPostcodes
{
public static boolean validateFirst4Integers( String First4Integers )
{
return First4Integers.matches( "[a-z]")
}
}
I know its not much but i dont know what else to put in ... HELP!
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|