Hello, I am writing a snipet to see how to make callfromtest2()work, I ran into this runtime error "Exception in thread "main" java.lang.NoSuchMethodError: test2: method <init>(Ltest1 V not found at test1.init(test1.java, Compiled Code) at test1.<init>(test1.java:1) at test1.main(test1.java:14) " Could someone tell me why this code didnt run? Also, where can I get additional explanation on the error msgs from jdk? Thank you. ==============
test10 t10; Here you are declaring a reference t10 of type test10 but your code does NOT contain any such class defintion ?? Where is class test10 defined?? Should that line of code be test1 t10 instead?
Joined: Dec 20, 2000
You were right! I forgot to change the name to test1 from test10. Sorry about the confusion. I just re-edited and made corrections to the codes.