Write an application that allows a user to enter two Strings
Solution
I have executed under netbeans IDE
 package countmatchestest;
import java.io.BufferedReader;
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.util.Scanner;
 public class CountMatchesTest {
String one,two;
   
 public void readInput() throws IOException{
 BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
System.out.print(\"Enter string one:\\t\");
 one = br.readLine();
 System.out.print(\"Enter string two:\\t\");
 two = br.readLine();
 System.out.println(\"Number of matches = \"+countMatch(one,two));
   
 }
 public int countMatch(String one,String two){
 int count =0,i;
 for(i=0;i<one.length();i++){
 
 if(one.charAt(i) == two.charAt(i)){
 count++;
 
 }
   
 }
 return count;
 }
 public static void main(String[] args) throws IOException {
   
 CountMatchesTest c= new CountMatchesTest();
 c.readInput();
 }
   
 }

