what is hashmap& hashtable with example?



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

Post New Answer

More Core Java Interview Questions

Do I need java for windows 10?

0 Answers  


What is function declaration?

0 Answers  


Explain listiterator and methods in listiterator?

0 Answers  


Explain the transient field modifier?

0 Answers  


Is boolean a wrapper class in java?

0 Answers  


What are scriptlets?

0 Answers  


i need income tax program using java inheritance concept. could u please help me?

2 Answers  


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?

0 Answers  


What is listnode in java?

0 Answers  


Variables used in a switch statement can be used with which datatypes?

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  


Categories