Re: A basic question about constants
- From: Dale King <DaleWKing@xxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 24 Jul 2005 01:55:12 GMT
Sebastian Scheid wrote:
"Richard" <grin@xxxxxxxx> schrieb im Newsbeitrag news:42e1fbdb$0$29943$636a15ce@xxxxxxxxxxxxxxx
Hello,
An extract from the javadoc of javax.sql.rowset.CachedRowSet (an interface):
---
COMMIT_ON_ACCEPT_CHANGES
static final boolean COMMIT_ON_ACCEPT_CHANGES
Causes the CachedRowSet object's SyncProvider to commit the changes when acceptChanges() is called. If set to false, the changes will not be committed until one of the CachedRowSet interface transaction methods is called.
See Also: commit(), rollback(), Constant Field Values ---
My basic question is: how is it possible to change the value of a constant defined in an interface?
The interface is in the SDK since 5.0 I think. And in 5.0 the field is not final in the sources as well as in the api-doc. What lib with the interface are you using?
As a field declared in an interface so it has no choice but to be final. Looking in the docs it does say it is final. Note that the field summary does not list final on any field. You have to look at the details of the field.
I must say I'm a little baffled by this one myself. I was thinking at first that they were declaring an interface for someone else to provide an implementation of and that implementation could have its own version of the interface with the constant set differently, but that doesn't really make sense.
-- Dale King .
- References:
- A basic question about constants
- From: Richard
- Re: A basic question about constants
- From: Sebastian Scheid
- A basic question about constants
- Prev by Date: parsing XML files with SAX
- Next by Date: Re: A basic question about constants. A final field that is not final?
- Previous by thread: Re: A basic question about constants
- Next by thread: Re: A basic question about constants. A final field that is not final?
- Index(es):
Relevant Pages
|