Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


can you create interface instance ?

Answers were Sorted based on User's Feedback



can you create interface instance ?..

Answer / prakash

!!!!!!!!!!!!!!!!!!marvelous!!!!!!!!!!!!!

Is This Answer Correct ?    2 Yes 23 No

can you create interface instance ?..

Answer / guest

sdfg

Is This Answer Correct ?    35 Yes 59 No

can you create interface instance ?..

Answer / anil

Uday..........Plz change ur name to James Gosling
Jr......dat suits u

Is This Answer Correct ?    0 Yes 28 No

can you create interface instance ?..

Answer / udaykiran

Why Not?
Yes, Even we can create an instance of interface and
abstract class also.
just see this below simple example

Main.java
-----------
interface Test
{
public void wish();
}
class Main
{
public static void main(String[] args)
{
Test t=new Test()
{
public void wish()
{
System.out.println("output: hello how r u");
}
};
t.wish();
}
}

cmd> javac Main.java
cmd> java Main
output: hello how r u

in above case Test is an interface but i created the object
for that interface.

Is This Answer Correct ?    54 Yes 92 No

Post New Answer

More Core Java Interview Questions

What is javac in java?

0 Answers  


I was asked to draw the class diagram for the below scenario which should obey OOPS concept. A Portal is to be developed for a school , which has 3 main divisions viz , Education , Admin & Trust. Each division has 2 sub divisions Kinder Garden & Higer Secondary.

3 Answers   Amtek, Huawei,


Differentiate between class and structure.

0 Answers   Amdocs, Motorola,


What are thread local variables?

0 Answers  


Can i have abstract class with no abstract methods?

22 Answers   CTS,


What does function identity () do?

0 Answers  


What comes to mind when someone mentions a shallow copy in java?

0 Answers  


Can try statements be nested?

3 Answers   Wipro,


What is n in java?

0 Answers  


we know that every java prog must follows OOPS Principles. Anybody can answer, HOW THE FOLLOWING PROGRAM FOLLOWS OOPS CONCEPTS i.e, Inheritance,Polymarphism,Encapsulation? class a{ public static void main(String args[]){ System.out.println("Hello World"); } }

3 Answers  


what is predefined function in java?

0 Answers  


What is consumer interface?

0 Answers  


Categories