简体   繁体   中英

java no such method (java.lang.NoSuchMethodException) exception

I am calling my method dynamically like this:

java.lang.reflect.Method method;
method = TestRecommendations.class.getMethod("level1classSimilarityForUser",
                                String[].class);

If you go to the class TestRecommendations , you will see that I do have it :

public ResultSet level1ClassSimilarityForUser(String ... userURI) {

what is my mistake please?

level1classSimilarityForUserlevel1classSimilarityForUser ,请尝试level1ClassSimilarityForUser

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM