Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how much simpler cant it work

807597Nov 11 2005 — edited Nov 11 2005
Hello
I am chagrined, but I cant see why this utterly simplistic code is giving an error. The error is "cannot find symbol, symbol class getInstance java.util.Calendar" Yes it really says class. I am asking for the method to create an instance of a Calendar for the default locale. And it does have that as shown right here in the javadoc, damnit. What am I missing here? tia.
package ad_hoc;

import java.text.*;
import java.util.*;

public class myDate {
  Calendar cal;
  public myDate() {
  }

  public static void main(String[] args) {
    Calendar now = new Calendar.getInstance();
    myDate mydate = new myDate();
  }
}
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 9 2005
Added on Nov 11 2005
1 comment
97 views