Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

strange error while compiling

 
Moieen Khatri
Ranch Hand
Posts: 144
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

When I try to compile TestCalenderClass.java, code below,I get the following errors:

import java.util.*;

class TestCalenderClass {
public static void main(String[] args)
{
Calender calender = Calender.getInstance();

System.out.println(calender);

}
}

Error:

E:\A>javac TestCalenderClass.java
TestCalenderClass.java:5: cannot find symbol
symbol : class Calender
location: class TestCalenderClass
Calender calender = Calender.getInstance();
^
TestCalenderClass.java:5: cannot find symbol
symbol : variable Calender
location: class TestCalenderClass
Calender calender = Calender.getInstance();
^
2 errors

I think the class Calender.java is not found while compilation.

Please can someone help?

Thanks in advance
 
Moieen Khatri
Ranch Hand
Posts: 144
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I found that I was using wrong spelling for Calendar.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic