What is use of static in java?



What is use of static in java?..

Answer / Kavita Saini

static is a keyword in Java that can be used to declare variables, methods, and blocks as static. Static members belong to the class rather than individual objects.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

Is arraylist an object in java?

1 Answers  


When we give defination of interface method in the class why method must be public???

2 Answers  


Why is java so important?

1 Answers  


There are 100 keys and values in HashMap.how to get the keys and values?

1 Answers   IBS,


I have a sorting issue with a Hashmap. My constraint is that I MUST use the Hashmap and work with existing code. I do a database query and place the results in a Hashmap. When I iterate thru the Hashmap, it loses the original alphabetical sorting done by the database. So, my problem is that I must sort the results coming out of the Hashmap which is then placed into another class.

1 Answers  


In the below Java Program, how many objects are eligible for garbage collection?

1 Answers  


Can we make main() thread as daemon?

1 Answers  


Why is java so popular?

1 Answers  


What is Java Classloader?

1 Answers   Phantom Technologies,


What is the role of the java.rmi.naming class?

1 Answers  


Can we have multiple classes in a single file?

1 Answers  


Is int a class in java?

1 Answers  


Categories