Solved

interface member variable

Posted on 2011-09-07
4
212 Views
Last Modified: 2012-05-12
i would like to know about interface member variables. I was reading as

Interfaces may have member variables, but these are implicitly public, static, and final- in other words, interfaces can declare only constants, not instance variables that are available to all implementations and may be used as key references for method arguments for example.



i am not clear on what it mean by ' as key references for method arguments'. Thanks in advance
0
Comment
Question by:gudii9
4 Comments
 
LVL 47

Accepted Solution

by:
for_yan earned 500 total points
ID: 36495604
Think about some say SwingConstants interface or something like that when they have constants like ScrollbarPoloicy.ALWAYS_PRESENT or something like that. The set methid actually need sinmpole integer, but for you easierbto remememver this integrer is given such mname and tyou use it is setrPoloicy method. You'll nmever need to change integer - so it isa final , it is all rthe way constant for all instances, and it is desugned to be used as parameter of tge methods.
0
 
LVL 7

Expert Comment

by:rumi78
ID: 36498385
gudii9 what a book you are reading ... :)

'as key references for method arguments' may be understand as 'may be used' :)
the example was about:
method(Interface.CONSTANT);
0
 
LVL 59

Expert Comment

by:Kevin Cross
ID: 36935269
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now