jon c

Greenhorn
+ Follow
since Sep 29, 2000
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by jon c

// creates an anonymous class which implements the interface ActionListener, and passes as an argument to the addActionListener() method
myButton.addActionListener(new ActionListener() {
.......
});
Inner class cannot have non-final static variables. (but some rule applies again for final static variables)
* Inner class can have final static variables.
static final int i = 10;
static final String s = "hello";
* But the following is wrong ( the static final variable cannot be initialized using an expression. "new" in the following code)
static final String s = new String("hello");
static final Integer ii = new Integer("12");
static String ss = "testing"; // not final
(Please Refer the inner class specs)
Please let me know if am wrong ..
[This message has been edited by jon c (edited September 29, 2000).]
Answer a is correct because,
static {
SIZE = 10;
MIN_VALUE = 10.3f;
}
is a static variable initializer block. This block gets executed when the class is loaded.
----------------
The following block initializes the instance variables when the instance is created. ( so,u cannot use this block to initialize a static final variable)
{
SIZE = 10;
MIN_VALUE = 10.3f;
}


[This message has been edited by jon c (edited September 29, 2000).]
Can somebody please clarify this ?. Is this required for the programmer's certification ?
Q- What are the new Certification requirements?
A-Certification requirements - Candidates must take one knowledge-based exam: