Skip to content

Tag: exception

Send Object Over Java Socket

I have a class name player (It is for creating a new player) I also have a client class: And im using objectOutputStream but it says that it “java.io.NotSerializableException: objects.Player” And I want to send my player to the server but it says that exception! Also if you need here is the server…

Throwing own exceptions

I have this class Account Now I also have this exception that I wrote Now I need to throw this exception in the class account,when the searched account number does not exist.Now my question is in which method(or function I think that is the same,please correct me if I’m wrong) do I throw this exception.…

Serial version uid in abstract exception class

I have a base custom exception class BaseException and several custom exceptions that extends BaseException I got a warning about serial version uid being not declared in the BaseException class. Is it needed in an abstract class? Is it a good practice? Is any way to get rid of the warning? Answer Yes, you ne…