NetBeans is glitching and calling a method that isn't there

NetBeans is glitching and calling a method that isn't there

I'm doing homework for a Data Structures class and making a 2-3 tree in NetBeans, but there's a glitch that keeps happening where a method is called twice, but the second time, it's being called by a statement that isn't there.

This is the method that is being called by the main class, main.Tree23.insert(). It's line 33 in my Tree23 class.

method named insert() inside the class Tree23. Code is running in debug mode with line 46 highlighted as a callstack line where current.insertItem(data) is being called.

Here is the call stack correctly listing the method calls so far:

Call stack displaying, from bottom to top, Tree23Remixed.main line 16, Tree23.insert line 46, and Node23.insertItem line 63.

But then, for no discernible reason, the method is called again and the line it calls is not even there. There's clearly blank space in line 51.

method named insert() inside the class Tree23. Code is running in debug mode with line 51 highlighted as a callstack line where there is a blank space. Call stack displaying, from bottom to top, Tree23Remixed.main line 16, Tree23.insert line 51, and Node23.insertItem line 64.

When I comment out the entire method, obviously, it doesn't run and I get a compilation error, and when I move it to another place in the code, it still runs line 51 (despite there being an entirely different statement there). I have no idea how to troubleshoot this. What could be causing this glitch?

Answer

can i use this with my phone hehe

Enjoyed this article?

Check out more content on our blog or follow us on social media.

Browse more articles