For example in this code:
public class Main
{
public static void main(String[] args)
{
Point p = new Point();
}
}
class Point
{
int x;
int y;
}
Is there a way to declare values to x
and y
already while running new
?