adspace


What is static variable and static method?

Answer Posted / kutta

a variable declared inside a method is local to that method.
it can't be accessed outside the method. if a variable
declared in a class means its a global variable.if we
declare a variable with static keyword in a class means it
can be accessed by all the class.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is java string pool?

1083


What is a classloader in java?

1090


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

1086


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

1040


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

1098


How to create a base64 decoder in java8?

1138


What is a constructor overloading in java?

1125


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

1076


Realized?

2264


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

1140


explain different ways of using thread? : Java thread

1082


Is minecraft 1.15 out?

1045


What is parsing in java?

1041


What do you mean by an interface in java?

1105


Differentiate between static and non-static methods in java.

1128