Java in General (beginner)
Java in General (beginner) No question too simple or small . . .
Can anyone tell me the concept of Interface , i have read about the contract concept, but i have doubt when it comes to serializable interface which doesnt have any methods to implement ,but how the JVM identifies when the class implements serializable then the instance of the class is meant for serialization. Where is the implementation of this serializable interface? How JVM recoginize it?--------------------regards, rajan SCJP 1.4
An introduction to interfaces can be found in theJava tutorial.The JVM can tell which interfcaes a particular class implements from its bytecode. If you look at the bytecode specification, you'll see that there is a section in each class listing all the implemented interfaces, independently of how many methods they have. You can also use the java.lang.Class.getInterfaces method to get at this information programmatically.--------------------BlogLearn something new on the Java platform: Scheme Prolog
i guess the answer to your question might bequote:The serialization interface has no methods or fields and serves only to identify the semantics of being serializable., the above I found from the following URLSUN