This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes annotation issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "annotation issue" Watch "annotation issue" New topic
Author

annotation issue

Marcus Deviln
Ranch Hand

Joined: Jan 29, 2009
Posts: 39
Let me start by saying hello to everyone and I hope that life is good!

Check out this issue...
1) the source:
public class Test3 {
public static void main(String[] args) {
java.util.Date[] dates = new java.util.Date[10];
System.out.println(dates[0]);
System.out.println(dates[0].toString());
}
}

2) the output:
c:\Users\Marcus\My Documents>javac Test3
error: Class names, 'Test3', are only accepted if annotation processing is expli
citly requested
1 error
My question is what caused that output?


+Deviln+ The power of JAVA compels you!
Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

You must type javac Test3.java


"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39478
    
  28
Please use the code button; your post is difficult to read otherwise.
 
Consider Paul's rocket mass heater.
 
subject: annotation issue