Answer Posted / murali
No, Static variables can be declared as a class attributes,
for example,
public classA{
static String m2="xyz"; // this is correct form
public static void main(String args[]){
static String m1="abc"; // this gives an error
(illegal modifier for parameter;;....)
}
}
| Is This Answer Correct ? | 25 Yes | 0 No |
Post New Answer View All Answers
What are measurable parameters?
What is a conditional equation?
What is runtime polymorphism or dynamic method dispatch?
Is logger a singleton?
What is the generic class?
What is method overloading with type promotion?
What methodology can be employed to locate substrings inside a string?
What modifiers are allowed for methods in an interface?
Is a method a function?
What is the primary benefit of encapsulation?
What is the intersection and union methods?
Is ++ operator is thread safe in java?
What do you mean by constructor?
Why chararray() is preferred over string to store the password?
What is the biggest integer?