I have a private class with 2 variables that I need to use in a for loop in my main function to output. I can't figure out how to use those 2 variables.
this is a for loop in my main function
for(String str : uaCount.keySet())
{
String [] arr = str.split("|", 2);
String s1 = arr[0];
String s2 = arr[1];
//what I want to do here is something like :
// average = keySet.sumTime / keySet.occurences;
System.out.println(s1 + "--->" + s2 + "Average = " + average + "seconds" );
}
here's my private function
private class NumberHolder
{
public int occurences;
public int sumTime;
}