Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Spring Framework | Web Services | BioInformatics | Java Server Faces | Jboss 3.0 tutorial | Hibernate 3.0 | XML

Tutorial Categories: Ajax | Articles | JSP | Bioinformatics | Database | Free Books | Hibernate | J2EE | J2ME | Java | JavaScript | JDBC | JMS | Linux | MS Technology | PHP | RMI | Web-Services | Servlets | Struts | UML


Search Host

Monthly Fee($)
Disk Space (MB)
Register With us for Newsletter!
Visit Forum! Post Questions!
Jobs At RoseIndia.net!

Have tutorials?
Add your tutorial to our Java Resource and get tons of hits.

We offer free hosting for your tutorials. and exposure for thousands of readers. drop a mail


Java Server Pages


Java Beans



Java Servlets



Java Code Examples

Interview Questions

Join For Newsletter

Powered by groups.yahoo.com
Visit Group! Post Questions!

Web Promotion

Web Submission

Submit Sites

Manual Submission?

Web Promotion Guide

Hosting Companies

Web Hosting Guide

Web Hosting


Beginner Guide to Linux Server


Persistence Framework

Web Frameworks

Free EAI Tools

Web Servers

Aspect Oriented Programming

Free Proxy Servers


Adware & Spyware Remover

Open Source Softwares

Quiz Questions
For Chapter 12

THIS PAGE CONTAINS A SAMPLE quiz on material from Chapter 12 of this on-line Java textbook. You should be able to answer these questions after studying that chapter. Sample answers to all the quiz questions can be found here.

Question 1: What is meant by generic programming and what is the alternative?

Question 2: Java does not support generic programming with the primitive types. Why not? What is it about generic programming in Java that prevents it from working with primitive types such as int and double.

Question 3: What is an iterator and why are iterators necessary for generic programming?

Question 4: Suppose that integers is a variable of type Collection and that every object in the collection belongs to the wrapper class Integer. Write a code segment that will compute the sum of all the integer values in the collection.

Question 5: Interfaces such as List, Set, and Map define abstract data types. Explain what this means.

Question 6: What is the fundamental property that distinguishes Sets from other types of Collections?

Question 7: What is the essential difference in functionality between a TreeMap and a HashMap?

Question 8: Explain what is meant by a hash code.

Question 9: Modify the following Date class so that it implements the Comparable interface. The ordering on objects of type Date should be the natural, chronological ordering.

      class Date {
         int month;  // Month number in range 1 to 12.
         int day;    // Day number in range 1 to 31.
         int year;   // Year number.
         Date(int m, int d, int y) { // Convenience constructor.
            month = m;
            day = d;
            year = y;

Question 10: Suppose that syllabus is a variable of type TreeMap, the keys in the map are objects belonging to the Date class from the previous problem, and the values are of type String. Write a code segment that will write out the value string for every key that is in the month of September, 2002.

[ Answers | Chapter Index | Main Index ]

Useful Links
  JDO Tutorials
  EAI Articles
  Struts Tutorials
  Java Tutorials
  Java Certification
Tell A Friend
Your Friend Name
Search Tutorials


Browse all Java Tutorials
Java JSP Struts Servlets Hibernate XML
Ajax JDBC EJB MySQL JavaScript JSF
Maven2 Tutorial JEE5 Tutorial Java Threading Tutorial Photoshop Tutorials Linux Technology
Technology Revolutions Eclipse Spring Tutorial Bioinformatics Tutorials Tools SQL

Home | JSP | EJB | JDBC | Java Servlets | WAP  | Free JSP Hosting  | Search Engine | News Archive | Jboss 3.0 tutorial | Free Linux CD's | Forum | Blogs

About Us | Advertising On RoseIndia.net

Send your comments, Suggestions or Queries regarding this site at roseindia_net@yahoo.com.

Copyright 2007. All rights reserved.