final_review_ans

final_review_ans - int lines = 0; while (fin.hasNextLine())...

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

View Full Document Right Arrow Icon
CS 302 Final Review Answers 1 True or False 1. False 2. True 3. False 4. False 5. True 6. True 7. False 8. True 9. True 10. False 11. True 2 Multiple Choice 12. B 13. B 14. A 15. C 16. B 17. A 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
3 Written Answers 18. public int getLinesInFile(File f) { try { Scanner fin = new Scanner(f);
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: int lines = 0; while (fin.hasNextLine()) { lines++; fin.nextLine(); } return lines; } catch (IOException e) { return -1; } return -1; } 19. Contents of A,B, and C: A = 2 3 1 2 B = 1 2 2 3 C = 2 3 5 2...
View Full Document

Page1 / 2

final_review_ans - int lines = 0; while (fin.hasNextLine())...

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