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 / john

@Uday Ur fooling amateur coders by creating an anonymous
class within the class . U cannot create an instance of an
Interface .If so try to make execute this code lol class

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

Is This Answer Correct ?    12 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between array list and vector in java?

904


What do you mean by data type?

982


What is difference between classpath and path variables in java?

1143


What is the char data type?

949


How do you convert string to int in java?

1025


Explain when we should make an instance variable private.

1054


What is the difference between the boolean & operator and the && operator in java programming?

998


Explain the difference between call by refrence and call by value?

983


What does it mean that a method or field is “static”?

929


What is the difference between the final method and abstract method?

997


What is the maximum size of hashmap in java?

949


Is java a pure object oriented language?

920


Is string is a class in java?

903


What does opcode mean?

1013


What is difference between equals and hashcode method?

1058