In Java, what’s the purpose of static methods and static variables?

Answer Posted / glibwaresoftsolutions

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


Please Help Members By Posting Answers For Below Questions

What does a za z0 9 mean?

747


What is exception in java?

745


What is the public method modifier?

732


What are different types of states exist for a thread?

769


What is hashtable and explain features of hashtable?

753


What are the important features of Java 8 release?

797


Write a method that will remove given character from the string?

763


Explain about class in java?

819


Explain different types of wrapper classes in java?

786


What is the relationship difference the canvas class and the graphics class?

785


What are alternatives to java serialization?

799


What is the function of character?

753


Can you make a constructor final?

778


What are runtime exceptions?

883


What are the features of junit?

809