Why Static variable required in java?For ex,class A
{
static int a;
int b;
}
Why static is required?
Answer Posted / aswini
Without using instance of the class means no need to use the class object to call static variable insted directly use the classname to use the static variable.moreover ,only one copy of static varible avaible to use all the classes.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Write down program for following scenario. Use java coding standard. You have array list with some words in it..we will call it as dictionary….and you have a arbitrary string containing some chars in it. You have to go through each word of dictionary and find out if that word can be constructed with the help of chars from arbitrary string given. If you find the word print it else print none.
Is a case study a method or methodology?
Can a static class implement an interface?
How to read and write image from a file ?
Is passing by reference faster?
What is difference between an object and a class?
What classes of exceptions may be caught by a catch clause in java programming?
Explain the difference between arraylist and linkedlist in java?
Which object oriented concept is achieved by using overloading and overriding?
who can i handle multiple client in RMI
What is the range of the short type?
What is skeleton and stub?
Name few java util classes introduced with java 8 ?
Can private method static?
How many days will it take to learn java?