Quiz4.wi11

Quiz4.wi11 - Signature _ cs8w _ CSE 8A Quiz 4 Winter 2011...

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

View Full Document Right Arrow Icon
Signature _____________________ CSE 8A Name ________________________ Quiz 4 cs8w ____ Winter 2011 Student ID ____________________ This quiz is to be taken by yourself with closed books, closed notes, no electronic devices. What will be output from the following code: int x = 0; int y = 5; while ( x < 10 && y <= 7 ) { x++; y++; System.out.println( x + " " + y ); } System.out.println( x + " " + y ); What will be output from the following code: int x = 2; int y = 5; while ( x < 3 || y <= 6 ) { System.out.println( x + " " + y ); x++; y++; } System.out.println( x + " " + y ); Write the equivalent statement using the other variable for each statement (A and B) below. In A) write the equivalent statement using noise , in B) write the equivalent statement using foo . Assume the following declarations: Sound noise = new Sound( FileChooser.pickAFile() ); SoundSample[] foo = noise.getSamples(); A) foo[17].setValue( 4444 ); B) noise.getSampleValueAt( i );
Background image of page 1

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

View Full DocumentRight Arrow Icon
Which of the following loops will NOT cause an ArrayIndexOutOfBounds exception? Circle all the correct
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 08/31/2011 for the course CSE 8a taught by Professor Kube,p during the Fall '08 term at UCSD.

Page1 / 2

Quiz4.wi11 - Signature _ cs8w _ CSE 8A Quiz 4 Winter 2011...

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