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 ?

Answer Posted / naresh jangili

no we can't create an object to interface and also abstract because two classes are un implememnted class for every un implemented classes we can create only reference varable.
but for every implemented classes we can create objects.
eg: interface A{
public void test()
}
class B implementes A
{
public void test()
{
s.o.p("hello");
}
public static void main(String argss[])
{
B b=new B(); (object creation)
A a1=null; (reference variable)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define how objects are stored in java?

1115


Make a data structure and implement an algorithm to print all the files in a directory. (The root directory can have sub-directories too.)

1378


What are the Main functions of Java?

1129


How to sort elements in a parallel array in java?

950


What is a ternary operator in java?

1034


How will you print number in reverse (descending) order in BST.

1040


Explain why wait(), notify() and notifyall() methods are in object class rather than in the reading class?

1026


What carriage return means?

1005


What is a platform?

1153


What is currentthread()?

1060


What are the different ways of creating thread?

1059


What is hashing in java?

1096


How do you access command-line arguments within the code?

1109


What is the function of character?

1107


How to convert string to byte array and vice versa?

1143