I am trying to pass the string firstName from a Servlet
called SampleServet. I am running this on eclipse and it
tells me that "the value for annotation attribute must be a
constant expression. I don't understand why it is giving me
this error.
@PersonAnnotation(name = SampleServlet.firstName)
public class AnnotationClass{
No Answer is Posted For this Question
Be the First to Post Answer
In java, why do we set thread priority, when we know that there is no guarantee by which a thread should be execute?
Why the program getting error if we don't use String args[] in main(), even in the case of not getting any arguments from command line?
Write a java program to display multiplication table in a Frame.
How to create Date method to set the date in Ms Access
write a java program to create a Frame with three scrolls, change the back ground color of the frame using functions with values of scrolls.
write a program in java to find the moving average of all prime numbers between 2 and 100.
Is it possible to define marker interface in java.If possible then how to define user defined marker interface?
Write a program to convert a decimal number to binary form?
Design a program using one-dimensional array that determines the highest value among the eight input values from a user. Display the difference of each value from the highest to the lowest.
How Can I Trace A Java Program . Please Give Me Step by Step Process
is public static void main() work in java?is "String arg[]" needed as argument?
I am trying to pass the string firstName from a Servlet called SampleServet. I am running this on eclipse and it tells me that "the value for annotation attribute must be a constant expression. I don't understand why it is giving me this error. @PersonAnnotation(name = SampleServlet.firstName) public class AnnotationClass{