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                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
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 an anonymous class?
 Question Submitted By :: Siddardh
I also faced this Question!!     Rank Answer Posted By  
 
  Re: what is an anonymous class?
Answer
# 1
anonymous class means its does not have a tag name.
as you  know that...
when u declare the class
class Tcs
{
......
....
}
But its not anonymous class because it has class name(tag);
if u declare like that
class
{
............
.........
}
then its called aonymous class
 
Is This Answer Correct ?    4 Yes 1 No
Kapil Dalke
 
  Re: what is an anonymous class?
Answer
# 2
Suppose 

Class My implements InetrfaceName{

My my=new InterfaceName(){ write mehtod impl here of 
interface};

here we r creating instance of class (we dont know name)to 
my
 
Is This Answer Correct ?    1 Yes 1 No
Dipesh
 
 
 
  Re: what is an anonymous class?
Answer
# 3
hi ,
look into this 


Anonymous type is the type that is created anonymously. 
Anonymous type is a class that is created automatically by 
compiler in somewhere you can’t see directly while you are 
declaring the structure of that class. Confusing? Let me 
show you one example.

view plaincopy to clipboardprint?
  
using System;   
using System.Collections.Generic;   
using System.Linq;   
using System.Text;   
  
namespace ConsoleApplication1 {   
class Program {   
static void Main(string[] args) {   
Person _person = new Person { ID = 1, FirstName 
= "Michael", LastName = "Sync" };   
Console.WriteLine("Name: {0} {1}", _person.FirstName, 
_person.LastName);   
Console.ReadLine();   
}   
}   
public class Person {   
public int ID { get; set; }   
public string FirstName { get; set; }   
public string LastName { get; set; }   
}   
}  
 
Is This Answer Correct ?    0 Yes 0 No
Narasimha
 
  Re: what is an anonymous class?
Answer
# 4
anonymous class are inner classes that cant not  have a
class name and constructor also.
 
Is This Answer Correct ?    3 Yes 0 No
Guru
 
  Re: what is an anonymous class?
Answer
# 5
anonymous class is a class which is defined on run time 
that it;
 
Is This Answer Correct ?    2 Yes 0 No
Nitin Kumar Jha
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
Hai all I want to print given array in reverse order Ex: int a[]={1,2,3,4,5};display this array in reverse order.  2
what is Hashmap & Hashtable wirh example? Saksoft4
WHAT IS THE MEANING OF ALL TYPE OF BUZZWORDS?  4
How are this() and super() used with constructors?  4
How to perform Singleton of the java class object on multi JVM?  1
What is the use join() in Threads ? HCL4
how many design pattern r there? and wht design pattern u use and why ? HP5
How the elements are organized in GridBagLayout?  1
why Runnable interface is preferable than extending the Thread class? Wipro5
How to send a request to garbage collector?  3
What is Distributed Application and what is its usage?  1
What is I/O Filter? TCS1
What are concepts of OOPS and how are they implemented in Java? KPIT2
What is the frontend and backedn in Java? TCS2
What is meant by event handling in SAX parser? Ness-Technologies1
Can we access private data outside of the class directly in java programming language? Why There is no runtime checking in java, which leads to access the private data directly outside of a class? Google2
C and C++ has constructors and distructors, why does Java does not have distructors? T3-Softwares1
What is Transient and volatile iFlex9
What method is used to compare two strings ?  4
whats the life cycle of jsp Satyam11
 
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