• Post Reply Bookmark Topic Watch Topic
  • New Topic

Cannot Resolve Symbol: Calendar.getInstance();  RSS feed

 
JiaPei Jen
Ranch Hand
Posts: 1309
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a little piece of code:


I got error messages: cannot resolve symbol
symbol: variable cal
 
Tim West
Ranch Hand
Posts: 539
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Presumably cal is a local variable?


public String getGMTTimestampFormat(Timestamp gmtTimestamp)
{
Timestamp timestamp = gmtTimestamp;
Calendar cal = Calendar.getInstance();
cal.setTime( timestamp );
...

[ June 16, 2004: Message edited by: Tim West ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!