What happens when a class is made static like if a field or
member is made static it becomes class variable and is
shared by all the object of the class?
Answer Posted / arvind verma
If a class is made static then we can access it's methods &
variables by using class name , no need to create class
object
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is the difference between final, finally and finalize()?
What is the requirement of thread in java?
What is meant by inheritance and what are its advantages?
What is meant by class loader? How many types are there? When will we use them?
What is the class in java?
What is meant by collection in java?
What are the two main uses of volatile in Java?
When is update method called?
Define canvas?
What is meant by JVM? Is JVM platform independent or not?
Which container method is used to cause a container to be laid out and redisplayed in java programming?
What are alternatives to java serialization?
4.1 Supply contracts (in the form of comments specifying pre- and post conditions) for the enqueue() method of the LinkedQueue class given in the Appendix. (2) 4.2 Let Thing be a class which is capable of cloning objects, and consider the code fragment: Thing thing1 = new Thing(); //(1) Thing thing2 = thing1; //(2) Thing thing3 = (Thing) thing1.clone(); //(3) Explain how the objects thing2 and thing3 differ from each other after execution of the statements. (
How transient variable is different from volatile variable?
How we can make copy of a java object?