Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

plz explain the o/p??

 
srikanth reddy
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
import java.util.*;
public class Test17{
public static void main(String a[]){
Map m = new Hashtable(10,0.75f);
System.out.println(m.size());
}
}

can nyone explain the o/p please???
 
Joanne Neal
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What output are you expecting ?
What output are you getting ?

The answer to your question is in the API docs.
[ September 02, 2005: Message edited by: Joanne Neal ]
 
A Kumar
Ranch Hand
Posts: 980
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
size()
Returns the number of key-value mappings in this map.


No key-value pairs..so value is 0

Regards
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic