• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

error

 
Andrew Lit
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
DanCranmer
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might need to use a "concrete subclass of Calendar", GregorianCalendar, see the following link for more info:
http://java.sun.com/j2se/1.3/docs/api/java/util/GregorianCalendar.html
 
Andrew Lit
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanx
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic