I\'m writing a program to send an object from one class to another class. Here is a short sample example of my program to represent the problem. As you can
You cannot ever deserialize a stream representing an instance of class X into an instance of class Y.
To solve your problem, you need to move the code for the Student class to another file, say Student.java, and use that single class on your client code and on your server code.
Note that if you modify your class, in most cases you will need to redeploy the server (otherwise the client would send the server an stream representing an instance of class that is known only to the client).