This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes toString() method is not overridden when a reference to Annotation is output in println() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "toString() method is not overridden when a reference to Annotation is output in println()" Watch "toString() method is not overridden when a reference to Annotation is output in println()" New topic
Author

toString() method is not overridden when a reference to Annotation is output in println()

Abhay Saini
Greenhorn

Joined: Jun 15, 2011
Posts: 19

OUTPUT :

All anotations for Main are
@javaapplication20.MyAnno(str=Falcon, yu=5)
@javaapplication20.Wasp(hg=54.67)
All Annotations for meth() are
@javaapplication20.MyAnno(str=Raptor, yu=7)
@javaapplication20.Wasp(hg=90.56)

Is overriding done or not? In the example, the name of package is not outputted. The output is without @javaapplication20 in every line
I posted this at stackoverflow.com and will soon tell if i get an answer from there

Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14117
    
  16

Please Be Forthright When Cross Posting to other sites.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Abhay Saini
Greenhorn

Joined: Jun 15, 2011
Posts: 19
Hey, But I did mention it
Stackoverflow.com
I don''t understand, what else do we have to do?
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19685
    
  20

Post a link to the topic in question, something Jesper has done this time. That allows us to look at the other sites as well.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Abhay Saini
Greenhorn

Joined: Jun 15, 2011
Posts: 19
Sorry ,
Will do it from next time
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: toString() method is not overridden when a reference to Annotation is output in println()