Hi ppl,
I read in 2-3 books that variables declared in interface are implicitly final,static and classes implementing it cant change its value.
But i changed the value of variable which i had defined in an interface; it worked well.. i even changed its type; from int to char it still worked well.
I even executed my program without defining that variable; it still worked fine.
Does this mean interface makes it necessary only for methods to be implemented by implementing classes and not variables?..des pite of the fact given in Complete reference of Java and some other books?
I read in 2-3 books that variables declared in interface are implicitly final,static and classes implementing it cant change its value.
But i changed the value of variable which i had defined in an interface; it worked well.. i even changed its type; from int to char it still worked well.
I even executed my program without defining that variable; it still worked fine.
Does this mean interface makes it necessary only for methods to be implemented by implementing classes and not variables?..des pite of the fact given in Complete reference of Java and some other books?
Comment