Kryonet registering and serializing methods isn't efficient?

After talking to some people, it made me wonder, when we pass an objects with methods to Kryonet to serialize, do the methods get serialized as well? and if they are wouldn’t it be more efficient to just pass the data(primitive variables) for Kryonet to serialize without any overhead methods?

Sorry if this is a silly question, the OCD strikes hard when it does.

Methods are a part of classes, not objects. They aren’t data, so they aren’t serialized.

To add onto this, this is why you have to register your objects in your network class (or whatever you use to register things for both your client and server implementations) with what they need. The methods are kept client side for both, so you can run methods on them, but the variables get passed around.