using variables from a private class in a main function

suresh36it

New Member
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\[code\]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" ); }\[/code\]here's my private function \[code\]private class NumberHolder{ public int occurences; public int sumTime;}\[/code\]
 
Back
Top