why static class in java



why static class in java..

Answer / Mr Praveen Kumar Jain

A static class in Java serves the following purposes:
1. Static classes can contain only static members (methods and variables). This means they do not need an instance of the class to be created before using them.
2. They are often used for utility or helper classes that provide functionality without requiring object creation.
3. Static classes are useful when you want to ensure that only one instance of a particular class can exist within a Java Virtual Machine (JVM).

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Advanced Java Interview Questions

What is the main functionality of RRL(Remote Reference Layer)?

3 Answers  


Where does the session Object stores? If 100 users are connecting to the server. How does it recognize which session belongs to which user?

5 Answers   HCL, Mobillo Venture,


Explain phantom read?

1 Answers  


What is difference RMI registry and OSAgent?

1 Answers  


Differences between applications and applets?

3 Answers  


difference between applicationserver and webserver

2 Answers   SolutionNET,


What are the sequence of steps to write pub or sub model kind of application?

1 Answers   TCS,


What is synchronization and why is it important?

1 Answers  


How are the elements of a borderlayout organized?

1 Answers  


what is the RMI / IIOP?

3 Answers  


What is meant by method chaining?

1 Answers  


How u validate date in DD/MM/YY format. and how u validate money in ur jsp

3 Answers   Ashok Leyland, Satyam, Tech Mahindra, Tomax,


Categories