I don't really know exactly what a "virtual keyboard" is and, less so, a "probability distribution and counter". But maybe this helps...

It is possible to construct a List instance (an ArrayList,...