![]() ![]() ![]() | Lecture 2 - slide 17 : 27 Program 1 |
public class ConstructorDemo{ // Denne klasse spiller rollen som // et hovedprogram static Point p1 = new Point(); static Point p2 = new Point(3.0); static Point p3 = new Point(1.1, 2.2); static Point p4 = new Point(p3); public static void main(String[] args){ System.out.println("p1 = " + p1); System.out.println("p2 = " + p2); System.out.println("p3 = " + p3); System.out.println("p4 = " + p4); } } // end class ConstructorDemo |