Answer Posted / arun kumar
class does not take space
eg:- empty folder have 0 byte space
object always take an space
eg:-files in folder
| Is This Answer Correct ? | 2 Yes | 4 No |
Post New Answer View All Answers
What is meant by tab pans?
Explain the purpose of garbage collection in Java?
Can anonymous class have constructor?
How does enum work in java?
how to one war file class to another war file class?
How do you override a private method in java?
How do you reverse a string in java without using string buffer?
What is a boolean flag in java?
Can we extend immutable class?
What are the six ways to use this keyword?
Explain java thread life cycle.
Does java support multiple inheritance or not?
How do you compare two objects?
What is constructor in java ?
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; }