This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes plz explain the o/p?? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "plz explain the o/p??" Watch "plz explain the o/p??" New topic
Author

plz explain the o/p??

srikanth reddy
Ranch Hand

Joined: Jul 28, 2005
Posts: 252
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???


Thanks & Regards<br /> <br />-Srikanth
Joanne Neal
Rancher

Joined: Aug 05, 2005
Posts: 3011
    
    9
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 ]

Joanne
A Kumar
Ranch Hand

Joined: Jul 04, 2004
Posts: 973
size()
Returns the number of key-value mappings in this map.


No key-value pairs..so value is 0

Regards
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: plz explain the o/p??
 
Similar Threads
static
overriding question
explanation needed
Varargs
float result