Hi,I am new in Java ,and I was wondering if somebody can explain what is the right way to create new object.Is the only right way the case 3,Am I only overwriting the arguments in the same object in case 1 and 2
Thanks
public static void main(String[] args) {
Date dateObj;
System.out.println(new Date(12,12,2000)); //case1
System.out.println(new Date(12,12,2000));//case2
Date dateObj2=new Date(11,11,2111); //case 3
System.out.println(dateObj2);
}