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

Why do we use static methods in c#?

1049


What does .length do in c#?

1000


How many types of constructors are available in c#?

1139


how to create crystal reports give one detail example(i want to view age category report) please give suitable example in my small knowledge

2057


Where do we use serialization in c#?

942


What is event and delegates in c#?

1035


How can I get around scope problems in a try/catch?

966


What is the difference between system.text.stringbuilder and system.string?

1073


If I have more than one version of one assemblies, then how'll I use old version (how/where to specify version number?)in my application?

973


How do you prevent a class from being inherited?

963


What is the function of .IsDescendent()?

1064


Give some examples of commonly used i/o classes?

958


What is null in database?

945


Explain how do I convert a string to an int in c#?

1013


Can namespace contain the private class?

985