Create LengthofLastWord.java

It is convenient to use Java to solve this problem.