What is the use of static class?



What is the use of static class?..

Answer / Ranjna Rani

A static class in Java contains only static members and cannot have non-static member variables or methods. It is used to group related utility methods or constants together without creating an instance of the class.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

Explain different ways of passing arguments to sub-routine?

1 Answers  


What is the use of arrays tostring () in java?

1 Answers  


Is java same as core java?

1 Answers  


What is data member in java?

1 Answers  


What is meant by tab pans?

1 Answers  


What is a method declaration?

1 Answers  


What is meant by method?

1 Answers  


Difference between static methods, static variables, and static classes in Java.

1 Answers  


Explain about field hiding in java?

1 Answers  


Given: 1. package test; 2. 3. class Target { 4. public String name = “hello”; 5. } What can directly access and change the value of the variable name? 1 any class 2 only the Target class 3 any class in the test package 4 any class that extends Target

7 Answers   Infosys, WW,


Explain Connection Pooling?

3 Answers  


How many bytes is a character?

1 Answers  


Categories