Tuesday, April 1, 2014

Some basic questions - Java
































Hello! I'm new to Java, so I thought I might receive some help here.
































I saw this code before, but without any explanation;
















































Java Code:





































public interface Printable {

public abstract void print();

}



































Could someone just kindly explain what it does?















My second questions is related to this code;
















































Java Code:





































public class SystemException extends Exception {

private String context;

public SystemException(String message) {

super(message);
}

public SystemException(String message, String context) {

super(message);
this.context = context;
}

public String getContext() {

return context;

}



































Quite frankly, I don't exactly understand what SystemException does, especially in this context. I would really appreciate some help to understand these. Also, please do excuse me if I have done something wrong when writing the codes in here. :)














































No comments:

Post a Comment