Java constructor explanation please?
<p>I dont understand how a constructor works
In the following code i know that we have a class, then two variables. When you create a variable you create a container for a value, so by declaring the variables x and y we created two containers, and they contain 0,0.</p>

<p>why the constructor, why the a and b?</p>

<pre><code>public class Point {
    public int x = 0;
    public int y = 0;

    //constructor
    public Point(int a, int b) {
        x = a;
        y = b;
    }
}
</code></pre>
