ch11Sections1-5 - 11.10 Exercises, Problems, and Projects...

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

View Full Document Right Arrow Icon
11.10 Exercises, Problems, and Projects 11.10.1 Multiple Choice Exercises 1. Exceptions enable programmers to attempt to recover from illegal situations and continue running the program 2. True 3. throws 4. False 5. java.io 6. an exception is thrown 7. the contents of the file, if any, will be deleted 8. we will be adding data at the end of the file 9. the argument to the Scanner constructor is an anonymous object 10. java.util 11. Serializable 11.10.2 Reading and Understanding Code 12. result is CS1 AND Java AND Illuminated AND 13. ABCD 14. AA BB CC 15. ABCD 16. result is ABCABA 17. The value of n is 3 18. Excellent Good Try to do better Excellent Good Excellent 19. Nice finish 20 . CS1Java Illuminated 21. ACEG 22. 0 1 2 3 4 23. The result is 10 11.10.3 Fill in the Code
Background image of page 1

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

View Full DocumentRight Arrow Icon
24. try { n = Integer.parseInt( s ); flag = false; } catch( NumberFormatException nfe ) { } 25. while( st.hasMoreTokens( ) ) { s = st.nextToken( ); if ( s.equals( "C" ) ) break; } 26. String s = file.nextLine( ); System.out.println( s );
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

ch11Sections1-5 - 11.10 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