In Java, what’s the purpose of static methods and static variables?
Answer Posted / nashiinformaticssolutions
When a method or variable needs to be shared across several objects of a class, developers utilize a static keyword to make it shared for all objects. Instead of making unique copies for every object, this is employed.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Can we inherit inner class?
What are the rules for variable declaration?
What is isa relationship?
What is the difference between char and char *?
What is data type example?
What is meant by the value of a variable?
what do you understand by synchronization? Or what is synchronization and why is it important? Or describe synchronization in respect to multithreading? Or what is synchronization? : Java thread
What do you mean by flow of struts?
What is the difference between access specifiers and access modifiers in java? 16
How would you dynamically allocate memory to an array?
What happens when you invoke a thread’s interrupt method while it is sleeping or waiting?
What happens if we override only equals?
What is classes in java?
Which class represents the socket that both the client and server use to communicate with each other?
what is meant by abstract class?