The moose likes Beginning Java and the fly likes error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "error" Watch "error" New topic


Andrew Lit
Ranch Hand

Joined: Jul 01, 2002
Posts: 135
while compiling my code i get such errors:
Class java.util.Calendar is abstract;cannot be instantiated at line *;
Constructor Calendar() has protected access in class java.util.Calendar at line *;
and that line is:
Calendar cal = new Calendar();
what could be the solution of this problem.

Joined: Jul 03, 2002
Posts: 2
You might need to use a "concrete subclass of Calendar", GregorianCalendar, see the following link for more info:
Andrew Lit
Ranch Hand

Joined: Jul 01, 2002
Posts: 135
I agree. Here's the link: http://aspose.com/file-tools
subject: error
Similar Threads
import statement
Working with SimpleDateFormat and DAte classes
Getting first date of next month
how can i access protected methods?
About protect method