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

What is generic class?

1134


Is arraylist dynamic in java?

1058


Which is better stringbuilder or stringbuffer?

995


What is module in project?

1027


Can You Have Virtual Functions In Java?

1204


List any five features of java?

1072


Does printwriter create a file?

1013


How do you bind variables?

1156


Can we declare a class as abstract without having any abstract method?

1045


How to implement a multithreaded applet?

2731


What is identifier give example?

1102


What is the difference between state-based unit testing and interaction-based unit testing?

989


What are mutable classes?

1129


What is object cloning in Java?

1150


what is heap memory?

1161