|
-
Identifier expected
What does an identifier expected error usually mean?
My code is below. It looks like it should work but I get the error below
the code when I run it.
<snippet>
import java.util.Calendar;
import java.text.DateFormat;
public class CzgCalendar {
Date theDate = new Date();
DateFormat theDateFormat = DateFormat.getDateTimeInstance(DateFormat.FULL,
DateFormat.FULL, currentLocale);
String dateOut = theDateFormat.format(theDate);
System.out.println(dateOut);
}
</snippet>
<error>
CzgCalendar.java:12: Identifier expected.
dateFormatter = DateFormat.getDateInstance(DateFormat.DEFAULT,
^
1 error
</error>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks