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 / hp

Yes we can declare variables in interafces
sample:
public interface nexusConstants {
// servlet names
public final String CSR_QUERY_SERVLET = "/qryCSS";
public final String MY_BILL_QUERY_SERVLET = "/qryMyBill";
public final String MY_HOME_QUERY_SERVLET = "/qryMyHome";
public final String TRY_BILL_QUERY_SERVLET = "/qryTryBill";
public final String CSR_XFER_SERVLET = "xferCSS"; }

This can be used by any class which require th values.
I have a live application which uses the interface variables.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How a two-dimensional array declared in C#?

910


What is a hash table c#?

819


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

2418


What is unrecognized escape sequence in c#?

876


Do we get an error while executing the “finally” block in c#?

885


Define a class and an object?

918


How does the lifecycle of Windows services differ from Standard EXE?

958


What does type safety mean?

1007


What is hierarchical inheritance in c#?

907


What is a helper method in c#?

884


Will the following code compile?

907


What is difference between tostring() vs convert.tostring() vs (string) cast

993


What is difference between function and method in c#?

851


What is a private method in c#?

961


Why do we need collections in c#?

818