Can't pass to the other method
Hi, i am using package, and i want to call a method in the other java file called triangle, but it can't. i tried to pass this
Triangle tri = new Triangle();
tri. create();
but it said "Accessing static method create()", both of the method is static.
After that, i use the suggestion from NetBeans, which is "Replace with class reference" and then it change to
Triangle.create();
but it still can't pass to the method create. can anyone please help?
Thank you
Re: Can't pass to the other method
Look into what static actually means. What do you mean you "can't pass to the method"? Pass what? Does the method have any parameters?
Re: Can't pass to the other method
I have delete all related static from the method, and now i got another error, it is
"Exception in thread "AWT-EventQueue-0" java.lang.StackOverflowError
at triangle_projection.Prim.<init>(Prim.java:10)
at triangle_projection.Triangle.<init>(Triangle.java: 13)
at triangle_projection.Prim.<init>"
what is this? i haven't seen this before, can you please help me?
Thank you
Re: Can't pass to the other method
That looks like you're stuck in an infinite recursive loop. One method is calling another method, which is calling the first method, which calls the second method, which...
But if you want any more help, you'll have to provide an SSCCE that demonstrates what you're talking about.