Solve problems 4,7,10,12,16,20 using Java.
Ignore Java class files.