Why static functions are used?



Why static functions are used?..

Answer / Sagar Kumar Verma

Static methods in Core Java belong to the class, not the object. They can be called without creating an instance of the class and are often used for utility purposes or to share common functionality among multiple classes within a package.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is a default constraint?

1 Answers   HCL,


Explain about transient variables in java?

1 Answers  


what is the use of pojo (plain old java objects)? how it is interact with crystal reports? pls urgent

1 Answers  


Difference between this() and super() in java ?

1 Answers  


Is array a class in java?

1 Answers  


Why super is first line in java?

1 Answers  


Why vector class is used?

1 Answers  


can you create interface instance ?

54 Answers   Fidelity, TCS,


Does garbage collection occur in permanent generation space in jvm?

1 Answers  


How to declare an arraylist in java?

1 Answers  


Mention some features of java?

1 Answers  


Where are the local variables stored?

1 Answers  


Categories