Java Programming - Inner Classes - Discussion
Discussion Forum : Inner Classes - General Questions (Q.No. 1)
                   
                                       
                                1.
Which is true about an anonymous inner class?
 
                                    Answer: Option
                                                    Explanation:
                                                Option C is correct because the syntax of an anonymous inner class allows for only one named type after the new, and that type must be either a single interface (in which case the anonymous class implements that one interface) or a single class (in which case the anonymous class extends that one class).
Option A, B, D, and E are all incorrect because they don't follow the syntax rules described in the response for answer Option C.
Discussion:
11 comments Page 2 of 2.
                
                        B.Chandrakala said: 
                         
                        3 years ago
                
                Agree, Option C is the right answer.
                Post your comments here:
 
            
        Quick links
                            Quantitative Aptitude
                                    
                                    Verbal (English)
                                    
                                    Reasoning
                                    
                                Programming
                                    
                                    Interview
                                    
                                     Placement Papers