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

Hi,
We can't create instance for an interface or abstract
class.Just remove the following code from the program
written by Uday.
interface Test
{
public void wish();
}
Remove the above code and run the program,then program will
compile and execute properly,because he used anonymous class.

Is This Answer Correct ?    11 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Under what conditions is an object’s finalize() method invoked by the garbage collector?

979


What is visibility mode?

898


What are parsing rules?

939


What are the different types of java?

991


Which is better stringbuffer or stringbuilder?

873


Why is string class considered immutable?

1003


How large is a boolean?

953


Can a class be declared as protected?

959


How many JVMs can run on a single machine and what is the meaning of Just-In-Time (JIT) compiler?

1340


What is sorting in java?

930


What is static data type in java?

981


What is the main use of generics in java?

920


What does localhost mean?

887


1.IN CASE OF DYNAMIC METHOD DISPATCH WHY WE USE REFERENCE VARIABLE,WE CAN USE THE DIFFERENT DEFINED OBJECT DIRECTLY TO ACCESS THE DATA MEMBER AND MEMBER FUNCTION OF THAT RESPECTIVE CLASS?WHAT IS THE MAIN FUNCTION OF "REFERENCE VARIABLE" HERE?

4820


In multi-threading how can we ensure that a resource isn't used by multiple threads simultaneously?

1270