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                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
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 is anonymous class?
 Question Submitted By :: Guest
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is anonymous class?
Answer
# 1
An Anonymous class is a class which is defined at run time 
without having any name and it is instantiated and declared
at the same place.
Syntax:
new class classname(){}
new interface interfacename(){}
Keyword extends and implements are usedin this class.
It is always implicitly final.
It is never static or final.
 
Is This Answer Correct ?    0 Yes 0 No
Niranjanravi
 
  Re: What is anonymous class?
Answer
# 2
it is a local inner class without any name.
it is instantiated at the time of declaration and must be 
extended by a class or implemented by an interface.

new [class name](argument list){anonymous class body};

overridden functions can be declared in this calss and it 
can have only one new method inside it.more than one can 
not be called anywhere.
using dot operator we can call that new function.
 
Is This Answer Correct ?    0 Yes 0 No
Rimjhim
 
 
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
In real time project which driver did u use? What is the main functionality of the Prepared Statement? Photon1
What is hash method?  1
What are the operands of instanceof operator?  2
what is the difference between Cpp And Java Infosys7
what is the difference between static block and static method Huawei9
What are integer overflows and underflows and how to handle them? Wipro2
Features of Java?  4
what is difference between colection and collections? Tech-Mahindra8
diff between abstract methods and interfaces with programing (code) example?  2
What are the latest versions in JAVA related areas? Netcraft2
Adapter classes?  3
what is the purpose of class "Object" which is base class for all classes?  3
Differentiate Vector and ArrayList? Wipro4
what is jms? features of jms CTS1
There are 2 classes, 1 LandAnimal and another WaterAnimal. There is another class Animal which wants to have the properties of both LandAnimal and WaterAnimal. How will you design this situation? KPIT3
Define Compiling?  2
Hi Friends, can you give difference between extending thread class and implementing runnable interface.  2
What are field variable and local variable?  2
my method "abc" return array of interface "xyz" and "pqr" is abstract class implements abc and class "jkl" extends pqr My problem 1) when i call abc it retrun array xyz how can i do this hint xyz refer_xyz = new jkl(); but i can't create array. 2)I want to access method of jkl using reference of xyz??  1
question on Thread synchronization Huawei1
 
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