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 is command line used for?
What is http client in java?
State one difference between a template class and class template.
What is the difference between exception and error in java?
Can we override the private methods?
How do you differentiate abstract class from interface?
How does map works in java?
What are the differences between Java 1.0 and Java 2.0?
Can we write any code after throw statement?
Why are the destructors for base class and derived class called in reverse order when the program exits
What is the difference between a break statement and a continue statement?
What is the difference between variable & constant?
Hi i am creating desktop application in that i want calling to mobile number. i have java telephone api (JTAPI) but i dont understand how it configure & use plese help me
difference between byte stream class and character stream class?
What is a numeric format?