Create Solution.java

Java Version