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

Does list maintain insertion order java?

927


What is array and arraylist in java?

1119


How finally used under exception handling?

949


How does callback work in java?

1073


How do you reverse sort a list in java?

944


What is string array?

1074


What are the differences between forwarding () method and sendredirect() methods?

1115


What does @override mean?

1215


When should I use singleton?

1045


What is a protected void?

939


What does singleton mean in java?

1004


What does || mean in code?

1047


Is array a class in java?

986


In which language java is written?

985


Is singleton class immutable?

974