What is static variable and static method?
Answer Posted / venkat
static variables are classes variables not instance
variables .They are instantianted only once for a
class.They are initialised at class load time.
Static method can be referenced with the name of the name
of the particular object of that class. That's how the
library methods like System.out.println works.
| Is This Answer Correct ? | 90 Yes | 49 No |
Post New Answer View All Answers
Can a class be a super class and a sub-class at the same time? Give example.
What is finalize method?
What are "methods" and "fields"?
What are different types of arrays?
How many types of design patterns are there?
What are the types of casting?
Are floats faster than doubles?
what r advatages of websphere? & how to deploy?
What is the use of string and stringbuffer?
Can we override private methods?
What environment variables are required to be set on a machine in order to run Java programs?
Which package is used for pattern matching with regular expressions?
How much is a java license?
How do you sort in java?
How to implement an arraylist in java?