Oracle Interview Question

Read a java file and count no of letters , digits and spaces