@Test无法运行
使用@Test需要导入两个依赖
junit-4.12.jar
hamcrest-core-1.3.jar
添加@Test
注解,却没有运行的三角形。需要在该类和方法上都加一个public
public class Solution {
@Test
public void test(){
int[] nums ={2,7,11,15};
System.out.println(twoSum(nums,9));
......