ch03Sections1-5 - 3.19 Exercises, Problems and Projects...

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

View Full Document Right Arrow Icon
3.19 Exercises, Problems and Projects 3.19.1 Multiple Choice Exercises 1. import 2. true 3. true 4. new 5. false 6. a class method 7. it is a class method 8. Quiz.foo( ); 9. 3 10. double 11. false 12. Char 13. Math.E; 3.19.2 Reading and Understanding Code 14. HI 15. ABCDEFGHIJ 16. hello 17. 5 18. 2.0 19. 3.141592653589793 20. 6 21. 4 22. 8 23. 8.0 3.19.3 Fill in the Code 24. System.out.println( s1 + s2 + s3 ); 25. System.out.println( s.length( ) ); 26. // code below assumes we have imported Scanner Scanner scan = new Scanner( System.in ); System.out.print( "Enter a word > " ); String word = scan.next( ); System.out.println( "You entered " + word ); System.out.println( word + " contains " + word.length( ) + " characters" ); 27. System.out.println( s1 + s2 + s3 + s4 ); 28. System.out.print( "Welcome " ); System.out.print( "to " ); System.out.print( "Java " ); System.out.print( "Illuminated" ); AF_CH03 Page 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
29. int max = Math.max( 3, 5 ); System.out.println( "The max of 3 and 5 is " + max ); 30. double sqRoot = Math.sqrt( d );
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 10/05/2011 for the course CS 38 taught by Professor Stevehouseman during the Summer '09 term at Irvine Valley College.

Page1 / 3

ch03Sections1-5 - 3.19 Exercises, Problems and Projects...

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

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