Write a java program to validate a string

Write a java program to validate a string. Write a program to read two strings and check whether or not they have dashes in the same places. Print “Yes” if the condition satisfies, else print “No”. The return type (Integer) should return 1 if all dashes are placed correctly, else return 2. Note: The strings must

Write a java program to validate PAN no.

java program to validate PAN no. Write a program to read a string and validate PAN no. against following rules: There must be eight characters. First three letters must be alphabets followed by four digit number and ends with alphabet All alphabets should be in capital case. Print “Valid” if the PAN no. is valid,