COMP 202 Lecture Notes - Lecture 30: While Loop

29 views3 pages
jc123 and 40170 others unlocked
COMP 202 Full Course Notes
100
COMP 202 Full Course Notes
Verified Note
100 documents

Document Summary

Comp 202 lecture 30 hashset and file reading. Java. util. hashmap: the keys in a hashmap are all unique and there cannot be any duplicates in the set of keys. Catching exceptions: in order to prevent your code from crashing at run time, you catch exceptions as follows o. The end but the error message as well. File i/o: this allows you to read to and write from a file. Ioexception: file io operations are so error prone that you are required to put them inside of a try-block and have a catch block for ioexception. Writing a file in java o: first create the file along with an object that can write to it, then create a buffer associated with that object. Reading from a file o: first create an object that reads from the file, this is an extremely error prone operation(typos) Filereader fr =new filereader(name): then create a buffer associated with the file.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents