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

How do I port "synchronized" functions from visual j++ to c#?

896


What are the variables in c#?

935


What are the boolean data types in c#?

1007


What is the implicit name of the parameter that gets passed into the set method/property of a class?

920


What is the difference between firstordefault and singleordefault?

887


What is difference between value and reference types in C#.NET

1094


What are delegates in C#?

1012


How does substring work in c#?

966


What are the 2 types of data types available in c#?

885


Is php better than c#?

911


How to implement delegates in c#.net

1010


What is interface inheritance?

942


Do extension methods have to be static?

1019


What is the use of the dispose method in C# ?

966


What is default method in c#?

1020