Mam nastepujacy kod i prosilbym o wytlumaczenie co oznacza komunikat ktory napisalem w komentarzu
class MyException extends Exception /// w tym miejscu Eclipse daje komunikat taki : The serializable class MyException does not // declare a static final serialVersionUID field of type long
{
private int detail;
MyException(int a)
{
detail = a;
}
public String toString()
{
return "MyException["+detail+"]";
}
}
class test
{
static void compute(int a) throws MyException
{
System.out.println("Wywolanie metody compute("+a+")");
if(a>10) throw new MyException(a);
System.out.println("Normalne wyjscie");
}
public static void main(String args[])
{
try
{
compute(2);
compute(50);
}
catch (MyException e)
{
System.out.println("Zlapano wyjatek "+e);
}
}
}