Hello,
I am trying to perform a little test on Annotation in Java. I wrote a very
small program in NETBEAN IDE, but I don't get any printout in the IDE Output
window. Can someone point out what is wrong with my coding. Thank you!
My annotation interface program is Test_Target.java:
package myannotation;
/**
*
*
*/
public @interface Test_Target {
public String doTestTarget();
}
My main program is Main.java:
package myannotation;
/**
*
*
*/
public class Main {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
new Main().doTestTarget();
}
@Test_Target(doTestTarget="Hello World !")
public void doTestTarget() {
System.out.println("Testing Target annotation");
}
}
I have highlighted my Project Node and right click to use the RUN Option to run
the program. Build is succssessful and no error. But no printout is observed in
the Output window. In this example, what is the correct text to be displayed
and what role is "Hello World" play in this scenario here?
Output window display:
run:
Testing Target annotation
BUILD SUCCESSFUL (total time: 0 seconds)
Regards,
Peeter
_________________________________________________________________
Hotmail: Trusted email with Microsoft’s powerful SPAM protection.
http://clk.atdmt.com/GBL/go/196390706/direct/01/
--
You received this message because you are subscribed to the Google
Groups "Java EE (J2EE) Programming with Passion!" group.
To post to this group, send email to
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en