Hi Shabarish,
I finally have the output line printed and the display line is "Testing Target
annotation. Now the question is what is the purpose of having annotation line
"Hello World" before the doTestTarget() method? It seems the annotation has no
impact at all. There are many examples in website explaining Annotation using
similar examples, but there were no actual explaination to what would happen.
public @interface Test_Target {
public String doTestTarget();
}
@Test_Target(doTestTarget="Hello World !") ---no impact to the method
public void doTestTarget() {
System.out.println("Testing Target annotation");
}
Thanks for your kind advice.
Regards,
Peeterbrunch
Date: Fri, 8 Jan 2010 17:26:14 +0530
Subject: Re: [java ee programming] Problem in testing Java annotation
programming
From: shabarish...@gmail.com
To: peeterbru...@hotmail.com
right click on your project and then click on debug project
On Fri, Jan 8, 2010 at 3:09 PM, peeter brunch <peeterbru...@hotmail.com> wrote:
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");
}
}
Hotmail: Trusted email with Microsoft’s powerful SPAM protection. Sign up now.
--
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
--
Thanks,
Shabarish.V
_________________________________________________________________
Hotmail: Powerful Free email with security by Microsoft.
http://clk.atdmt.com/GBL/go/196390710/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