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

i am bit confused with this one.
If it is referring to an anonymous class then if i am changing like below then why it is not working?

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

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How java enabled high performance?

1002


Explain about map interface in java?

944


Can you call a method in a method?

1010


What is constructor and virtual function? Can we call a virtual function in a constructor?

1083


What are the different types of inheritance in java?

951


How do singleton patterns work?

918


What is assembly language?

924


Describe how to implement singleton design pattern in struts.

948


Which graphs are functions?

901


How to perform quicksort in java?

1033


What is the difference between Java1.4 and Java1.5

2253


Write a method to check if input string is palindrome?

963


How do you use equal in java?

994


How to make a non daemon thread as daemon?

1012


when should you use stringbuilder class in a program?

921