QuizReview

QuizReview - COE318 Quiz Study Guide September 20, 2007 The...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
September 20, 2007 The following questions illustrate some of the Java topics you should know for the quiz next Tuesday. You should also look at the exercises in the text book, especially those in Chapters 2 and 3. Questions: 1. The source code for a class is: public class Foo { public static void main(String [] args) { System.out.println("foo"); } } a) What is the full name of the source code file? b) What command is used to compile it c) What is the full name of the compiled file? d) What command is used to run it? e) What is the output? 2. Consider the following code: public class A { public static void main(String[] args) { int i = 0; while (i < 3) { System.out.println("A"); i = i + 1; int j = 0; while (j < 2) { j = j + 1; System.out.println("B"); } } } } a) How many times is the letter A printed? b) How many times is the letter B printed? 3. Consider the following class: class Foo { int id; //. .... public static void main(String [] args) {
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

QuizReview - COE318 Quiz Study Guide September 20, 2007 The...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online