Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

interface member variable

Posted on 2011-09-07
4
Medium Priority
?
232 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 2000 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
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 about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Suggested Courses

660 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