3:42 pm - Thursday November 18, 9976

Hashtable Example program for isEmpty()

CANDID INDUSTRIAL TRAINING -- CHENNAI
Corporate Training for Experienced Candidate
Struts | Hibernate | Spring | Java / J2EE
SOAP | RestFull | Design Pattern | more...
Ph: +91 72000 69003
137b, 2nd st, shanthi nagar, Chrompet, Chennai -600044
/**
Author :candidjava.com
Description: Tests if this hashtable maps no keys to values.
 */
import java.util.*;
import java.util.Hashtable;
import java.io.IOException;

public class HashtableIsEmptyExample {
	public static void main(String args[]) throws IOException {
		boolean i;
		Hashtable h = new Hashtable();
		i = h.isEmpty(); // if the hashmap has no value means true else false.
		System.out.println(i);
	}
}


Output
True

Filed in: Z-A All Java Codes

Comments are closed.