Given points on a 2D plane, find line that passes through the most points
i think your task was to use the given classes Point and Lineand extend them...

public class Line{

    public Line (Point a, Point b);

    public boolean contains(Point p);

}


thus leaving a quite simple task in your Solution (and pretty easy to read)

Lines lines = getAllLines();//easily iterate over the permutated Point matrix

for(Line line: lines){
    int amountOfPoints = 0;
    for (Point p: points){
        if (line.contains(p) {
            amountOfPoint = amountOfPoint + 1;
    }       
}


NOTE

this is just an explanation of OO-Programming, i didn't include the subtaks, e.g. how to get the max of the lines, or how contains() works, but it surely gives a hint on where the questions aims at...