Question : Stack Trace in Eclipse

Why is it that some entries in the stack trace have $2 suffixed to the object name - for example classType$2?  Does this mean that the object was created on another thread and cannot be accessed on the current thread?  

This also creates a problem in the code since the object does not return true as an "instanceof classType".

How to access this as classType instead of classType$2?

Answer : Stack Trace in Eclipse

all inner classes are in a parent class, otherwise they would not be *inner* classes :)

eg. the following creates an anon inner class

button.addActionListener(new ActionListener() {
   public void actionPerformed(ActionEvent event) {
       // do stuff here
   }
});

Random Solutions  
 
programming4us programming4us