Getting instance of a class in ArrayList
        Posted  
        
            by 
                user1499974
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by user1499974
        
        
        
        Published on 2012-07-03T21:05:09Z
        Indexed on 
            2012/07/03
            21:15 UTC
        
        
        Read the original article
        Hit count: 211
        
I have a small problem with ArrayList. You see, I wish to get an instance of RenderNewHUD in my renderer class, which has a list of registered renderers. I did not want to create a variable for this due to limitations and awkwardness. Here is my code.
RenderNewHUD hud = renderer.renderList.get(RenderNewHUD());
How exactly can I go along getting the instance of RenderNewHUD without creating a new instance? If you need any more of my code, just ask. Sorry if this is a very dumb question - I have looked EVERYWHERE for an answer.
© Stack Overflow or respective owner