Possible Duplicate:
Java final modifier
This is just a small question about preferences. What would be the correct usage for the final modifier?
I have noticed that going from source-to-source that I tend to use it more than others. I put it for the parameters for a method, for variables in the method and what ever I can. Is that necessary or am I just overdoing it?
Reference:
private final int x;
private final int y;
private final int id;
private final int width;
private final int height;
public Widget(final int id, final int x, final int y, final int width, final int height) {
this.id = id;
this.x = x;
this.y = y;
this.xmod = x;
this.ymod = y;
this.width = width;
this.height = height;
}