exam1-2007-Spring-practicified-forFall07

exam1-2007-Spring-practicified-forFall07 - CS 1331 1. Test...

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

View Full Document Right Arrow Icon
CS 1331 Test 1 (Spring 2007) February 2, 2007 1. True/False [ 20 pts ] Answer the following questions True or False. Circle the correct answer. If you have to make a correction, then spell out the word True or False. (a) (True / False) Casting a double to an integer type rounds it to the nearest integer. (b) (True / False) One can actually do math with booleans because they really represent 0 and 1. (c) (True / False) The command javac MyApplet.java will compile your applet. (d) (True / False) The command java MyApplet will run your applet. (e) (True / False) In java, the exponentiation operator is the ** (two asterisks). (f) (True / False) Autoboxing is the automatic creation of a wrapper class instance from a primitive type when needed. (g) (True / False) To indicate which color to use, the Graphics class has a useColor method. (h) (True / False) To write text on a Graphics object, one uses the System.out.println method. (i) (True / False) Casting a char to an int is legal. (j) (True / False) Many drawing methods have a solid shape counterpart. For example, a hollow rectangle is drawn using drawRect, but a solid rectangle is drawn using drawFilledRect. 2.
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 / 2

exam1-2007-Spring-practicified-forFall07 - CS 1331 1. Test...

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