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
roseindia_net@yahoo.com
 
   

Tutorials

Java Server Pages

JAXB

Java Beans

JDBC

MySQL

Java Servlets

Struts

Bioinformatics

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

Linux

Beginner Guide to Linux Server

Frameworks

Persistence Framework

Web Frameworks

Free EAI Tools

Web Servers

Aspect Oriented Programming

Free Proxy Servers

Softwares

Adware & Spyware Remover

Open Source Softwares

Quiz Questions
For Chapter 3


THIS PAGE CONTAINS A SAMPLE quiz on material from Chapter 3 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: Explain briefly what is meant by "pseudocode" and how is it useful in the development of algorithms.

Question 2: What is a block statement? How are block statements used in Java programs.

Question 3: What is the main difference between a while loop and a do..while loop?

Question 4: What does it mean to prime a loop?

Question 5: Explain what is meant by an animation and how a computer displays an animation.

Question 6: Write a for loop that will print out all the multiples of 3 from 3 to 36, that is: 3 6 9 12 15 18 21 24 27 30 33 36.

Question 7: Fill in the following main() routine so that it will ask the user to enter an integer, read the user's response, and tell the user whether the number entered is even or odd. (You can use TextIO.getInt() to read the integer. Recall that an integer n is even if n % 2 == 0.)

                public static void main(String[] args) {
                
                        // Fill in the body of this subroutine!
                
                }
                

Question 8: Show the exact output that would be produced by the following main() routine:

         public static void main(String[] args) {
             int N;
             N = 1;
             while (N <= 32) {
                N = 2 * N;
                System.out.println(N);   
             }
         }
         

Question 9: Show the exact output produced by the following main() routine:

              public static void main(String[] args) {
                 int x,y;
                 x = 5;
                 y = 1;
                 while (x > 0) {
                    x = x - 1;
                    y = y * x;
                    System.out.println(y);
                 }
              }
              

Question 10: What output is produced by the following program segment? Why? (Recall that name.charAt(i) is the i-th character in the string, name.)

         String name;
         int i;
         boolean startWord;

         name = "Richard M. Nixon";
         startWord = true;
         for (i = 0; i < name.length(); i++) {
            if (startWord)
               System.out.println(name.charAt(i));
            if (name.charAt(i) == ' ')
               startWord = true;
            else
               startWord = false;
         }

[ 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.