public static double simList(List<String> list1, List<String> list2){},怎样调用这个函数
为什么我定义了两个变量List<String> lst1 = new List<String>(){"我","喜欢","吃","西红柿"};List<String> lst2 = new List<String>(){"我","喜欢","吃","番茄"};,然后用double simVal=simList(lst1,lst2)调用它,老是不行呢?请大侠问答,谢谢!
------解决方案--------------------new List<String>(){"我","喜欢","吃","西红柿"};
List是个接口 不能直接用
------解决方案--------------------得一个个的 lst1 .add(xx)