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 we define a variable with the access modifier private
in an interface?

Answer Posted / rajat

No you cannot.
1. Because an interface cannot contain fields.
2. For methods also, you cannot give an access modifier
(public / private). By default, the methods will be public

Is This Answer Correct ?    17 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between ref and out parameters in c#?

946


write code for inserting and updating recoards in sql server database using connected architecture & records shoulds displayed in grid view ( use c# )

2429


Why do we use struct in c#?

924


What are native functions?

838


Can you inherit multiple abstract classes in c#?

888


What are the Types of values mode can hold session state in web.config

953


Can abstract class have constructor?

827


What does args mean in c#?

857


What is difference between encapsulation and abstraction in c#?

918


What are Memory foot print of an exe?

961


What is callback function in c#?

878


Are c# objects passed by reference?

847


What is console readkey ()?

901


What is the use of inheritance in c#?

859


How many keyword present in C# language ?

955