What happens to a static var that is defined within a method of a class?


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More Core Java Interview Questions

What is the code inside the public void actionPerformed(ActionEvent ae) override method in Applet [ Condition:- you have one TextField and One Button , you have to enter any color name inside the TextField, when you click on Button Your background will change according to your input color name]

2 Answers   IBM,


Can we override the private methods?

0 Answers  


What is an abstract class and what is it’s purpose?

0 Answers  


What does the three dot emoji mean?

0 Answers  


What is main string [] args?

0 Answers  






How do you override a private method in java?

0 Answers  


What is the do while loop syntax?

0 Answers  


What is port number in java?

0 Answers  


What is the full form of jpeg?

0 Answers  


public class Test { public static void main(String[] args) { int countA = 0; int countB = 0; int countC = 0; int countD = 0; int countE = 0; int countF = 0; int countG = 0; int countH = 0; int countI = 0; int countJ = 0; int countK = 0; int countL = 0; int countM = 0; int countN = 0; int countO = 0; int countP = 0; int countQ = 0; int countR = 0; int countS = 0; int countT = 0; int countU = 0; int countV = 0; int countW = 0; int countX = 0; int countY = 0; int countZ = 0; } } Can anybody tell me any alternate solution(like loop or something) to automate this initialization process. Ex:- for(char chr='A';chr<='Z'; chr++) { (int) String "count"+chr = 0; }

0 Answers  


How do you remove an element from an arraylist in java?

0 Answers  


Difference between hashCode() & equals()?

3 Answers   HCL,


Categories