what is hashmap& hashtable with example?
Answer / siva kumar g.
Both are collection of objects.
Both are used to store the key , value pairs.
Hashtable is synchronized where as Hashmap is not.
Hashtable does't allow the null values.
Is This Answer Correct ? | 7 Yes | 1 No |
Do I need java for windows 10?
What is function declaration?
Explain listiterator and methods in listiterator?
Explain the transient field modifier?
Is boolean a wrapper class in java?
What are scriptlets?
i need income tax program using java inheritance concept. could u please help me?
what is the diff b/w arraylist and vector?
6 Answers Code Genesis, Genesis, Sprintine Labs,
Which is faster call by value or call by reference?
What is listnode in java?
Variables used in a switch statement can be used with which datatypes?
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; }