rj
2014-11-21 21:35:00
I have a question, been working on a Java game and I am wondering what eclipse means when it gives me the warning:

Box.class:
this line:

Box.class:
package main;
public class Box {
public final int x1;
public final int y1;
public final int x2;
public final int y2;
public Box(int x1, int y1, int x2, int y2) {
this.x1 = x1;
this.x2 = x2;
this.y1 = y1;
this.y2 = y2;
}
public static boolean collision(Box box1, Box box2) {
return !((box1.y2 < box2.y1) || (box1.y1 > box2.y2) || (box1.x1 > box2.x2) || (box1.x2 < box2.x1) );
}
public boolean collision(Box box) {
return this.collision(this, box);
}
}this line:
return this.collision(this, box);