Update 2Sum.java

delete test main function