java - Byte Code vs Stream of bytes(Serialization) -
this question has answer here:
i have question regarding byte code , serialization.
bytecode - every java class converted bytecode compilation , stored on memory (disk) stream of bytes / bytecode.
serialization - serialization process of saving object's state sequence of bytes.
can't bytecode used send through network ?
so exact difference between 2 ??
thanks in advance.
the concepts unrelated.
every java class converted bytecode compilation
no, isn't converted for compilation. bytecode result of compilation. is, well, code run virtual machine (jvm in java's case) machine code run directly cpu. binary (a sequence of bytes instead of characters) because it's more compact representation. doesn't contain state of objects (except constants).
serialization stores state of object (default java serialization binary, other libraries/languages can use text). serialized object doesn't contain bytecode: can't run or in jvm.
Comments
Post a Comment