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; }
1841MY code is: public class P1{
public static void main(String ar[])
{
class.forName("java.lang.String");
}
}
errors i got are :New.java:5: error:
What one should take care of, while serializing the object?
Can we write class inside a class in java?
In how many ways we can do synchronization in java?
Will the general public have access to the infobus apis?
What is transactional spring?
List the advantages of using datasource?
Why spring cloud is required?
Can singleton class be inherited in java?
Why do we use sendredirect() method?
what is daemon thread and which method is used to create the daemon thread? : Java thread
What happens when a failure occurs and the stub cannot connect to a weblogic server instance?
Is it possible to connect to multiple databases simultaneously?
What do you mean by of string::valueof expression in java 8?
what is object-oriented programming in java?
Why java is called portable language?