Java assigning values to variables in an Interface class through xml

Is it possible to change the value of variables in an interface class using XmlDecoder and XmlEncoder?.

I have an interface class that contains variables that needs to be implemented by other classes. however the value of these variables needs to be changed after some time.

Jon Skeet
people
quotationmark

I have an interface class the contains variables that needs to be implemented by other classes.

Interfaces can't contain variables as such - they can only contain constants, so it makes no sense to try to change the value of them.

From JLS 9.3:

Every field declaration in the body of an interface is implicitly public, static, and final.

Your interface should contain appropriate getters/setters instead - or have an abstract superclass which contains the appropriate fields.

people

See more on this question at Stackoverflow