adspace


What is static variable and static method?

Answer Posted / pankaj

just im telling about
-> what is static method in java
Ans ->static method represent class behaviour and instance variable represent object behaviour ..but instance of a class is not require for the invokation of static varibale.
-> static data member of the class can be referd in a static block or methd.
-> static block and static method can directly invoked the static method ,nonstatic method can not directly by static method or static block.
->this and supper keyword can not be use in static block and method

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is minecraft 1.15 out?

1045


What is the difference between break and continue statements?

1127


Explain public static void main(string args[]) in java.

1076


explain different ways of using thread? : Java thread

1082


Write a program to print count of empty strings in java 8?

1086


What is a constructor overloading in java?

1125


Write a program to find the whether a number is an Armstrong number or not?

1098


What is an object in java and how is it created?

1140


What are the differences between heap and stack memory in java?

1140


How to create a base64 decoder in java8?

1138


How to sort array in descending order in java?

996


Differentiate between static and non-static methods in java.

1128


What is the difference between equals() and == in java?

1040


What is java string pool?

1083


What do you mean by an interface in java?

1105