Very new to learning java and I'm working on a simple program that displays the number of matched characters between two user inputted strings. At the end it will display the total number of characters that matched as well as the letters that matched. I'm stuck on how to carry the value out of the inner for loop back to the main method to be called. 

```
import java.util.Scanner;
public class CountMatches
{
    public static void main(String[] args)
    {
        int matches = 0;
        String aString;
        String anotherString;

        Scanner inputDevice = new Scanner(System.in);
        System.out.print("Enter a String >> ");
        aString = inputDevice.nextLine();
        System.out.print("Enter another string>> ");
        anotherString = inputDevice.nextLine();

        for(int i = 0; i < aString.length(); ++i)
        {

            for(int j = 0; j < anotherString.length(); ++j)
            {
                if(aString.charAt(i) == anotherString.charAt(j))
                    matches++;

            }

        }

       System.out.println(matches + " character(s) in " + aString + " are 
       also in " + anotherString);

   }
}

```

Edit: I should also mention that this assignment I'm working on, I haven't gotten to the point where I'm utilizing arrays. We have just covered loops and if then statements. So I am very early on in studying java.