ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
info       Did you received any Funny E-Mails from your Friends and like to share with rest of our friends? Yeah!! you can post that stuff   HERE
Google
 
Categories  >>  Software  >>  Core Java  >>  Java J2EE  >>  Java Related
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
What are inner and anonymous class?
 Question Submitted By :: Aparna
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What are inner and anonymous class?
Answer
# 1
Inner classes as name suggests, can be declared within a
class, as for that matter, with in a for statement too... or
with in a method of another class.

Anonymous classes are also inner classes but without a name,

The advantage being more abstraction of code, but more
confusing to beginners
 
Is This Answer Correct ?    0 Yes 0 No
Sathya
 
  Re: What are inner and anonymous class?
Answer
# 2
Inner Class: classes defined in other classes ,including 
those defined in methods are called inner classes.
 An inner class can have any accessiblity including private.

Anonumous class: Anonymous class is a class defined inside 
a method without a name and is instantiated and declared in 
the same place and cannot have explicit constructors.
 
Is This Answer Correct ?    0 Yes 0 No
Janet
 
 
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
What are the OOPS concepts in Java ? Satyam3
How many ways can an argument be passed to a subroutine?  2
I need to know about complete topic in java's collections i with an examples TCS1
Can an anonymous class be declared as implementing an interface and extending a class?  1
Can a Byte object be cast to a double value?  2
Difference String and String Buffer  3
What is the difference between this() and super()? TCS11
what is auto boxing UHG1
Without creating a new object, How you can retrieve a String or other object?  1
what is the difference between AWT and SWING what is the advantage of using swing?  3
why java does not support mulitple inheritance directly? TCS2
What are wrapped classes?  6
To what value is a variable of the Boolean type automatically initialized?  3
what is the use/perpose of having a method antive?  2
Hi Friends, can you give difference between extending thread class and implementing runnable interface.  2
What is the difference between Trusted and Untrusted Applet ? IBM1
when we have to use final class in java?  2
Does 'true' and 'false' are keywords?  5
what is difference between validation.xml & validation rules.xml? BirlaSoft5
whats is the use of final,in which situation final can be used in the application? DNS2
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com