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

Answer Posted / nashiinformaticssolutions

A variable, method, or class can be made static by using the static keyword. A static class cannot be instantiated. When both objects or instances of a class share the same variables, this is referred to as static variables. Static methods are simply methods that refer to the class in which they are written.

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 replaceall do in java?

709


How do you download stubs from Remote place?

1550


How do we access static members in java?

856


Which is the best sorting technique in java?

765


What is callable java?

755


What is a treeset in java?

769


How does map works in java?

755


Why is it called buffering?

845


what is instanceof operator used in java?

794


What is strings in java?

811


What does void * mean?

726


What is the constructor?

824


What is binary search in java?

797


What does jenkins do?

692


What are the two environment variables that must be set in order to run any java programs?

738