Solved

interface member variable

Posted on 2011-09-07
4
223 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 60

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
Suggested Courses

751 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