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 I have constructor in Interface?

Answer Posted / saroj kumar biswal

no we can't have constructor in an interface, why bcz constructor is used to initialize the instance variable stored in an object. Constructor is called concurrently while creating object. We can't create object to interface & also we can't provide instance variable to interface. So we can't use constructor in an interface

Is This Answer Correct ?    30 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is variable in java?

987


What are the advantages of exception handling in java?

1061


how can you catch multiple exceptions in java?

1015


What is command line argument in java?

1151


'A class is a template for an object' explain this statement.

1056


What is an object's lock and which object's have locks in java programming?

1048


what is optional in java 8?

1061


What do heavy weight components mean in java programming?

950


Difference between ‘is-a’ and ‘has-a’ relationship in java?

1006


How do you reverse a word in java?

1078


What are examples of modifiers?

1127


What does main method?

979


Why do we need hashmap in java?

1116


Can we create our own wrapper class in java?

968


What is difference between module and function?

1180