kuce() is a method on the class metodes. You're trying to call it on class List<String>, as that's what the variable mauka is declared as. You need to make an instance of metodes and then you can call kuce() on that.

网友答案:

The problem reported by compiler means that it is unable to find kuce() with the List interface of Collections.

kuce() method has been defined in metodes class and only can be used with the objects of metode . You are trying to call kuce() on List interface .

could you please change your code to create and object of metodes and then call kuce() on it.