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

Is a boolean variable?

1063


What does 3 dots mean in java?

1034


Why to use nested classes in java? (Or) what is the purpose of nested class in java?

1120


What is an iterator java?

1198


Can we rethrow the same exception from catch handler?

1172


What restrictions are placed on method overriding?

1238


What is a qualifier in a sentence?

1041


Why are generics used?

1029


Where we write javascript code in html page?

1102


Explain what is encapsulation?

1137


Is string a datatype?

1037


Which data type is class in java?

1060


What are instance variables?

1125


Can substring create new object?

1185


Write a program in java to establish a connection between client and server?

1016