This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: SoundSample foo = noise.getSamples(); A) noise.getSampleValueAt( i ); B) foo.setValue( 3700 ); Which of the following loops will NOT cause an ArrayIndexOutOfBounds exception? Circle all the correct answers. There may be more than one correct answer. [Correct +1; Incorrect: -1; No negative score] A) for ( int i = 0; i <= this.getWidth(); i++ ) B) for ( int i = this.getWidth(); i > 0; i-- ) C) for ( int i = this.getWidth() 1; i >= 0; i-- ) D) for ( int i = 16; i < this.getWidth(); i++ ) E) for ( int i = this.getWidth() 16; i > 0; i-- ) F) for ( int i = -1; i < this.getWidth(); i++ ) Put your answer here: ______ What is printed if the line if ( foo < a ) was changed to if ( foo <= a ) ? ______ What is printed if the line if ( foo < a ) was changed to if ( foo > a ) ? ______...
View Full 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.
- Fall '08
- Computer Programming