IBM
LOT-410 · Question #13
Peter is writing a Java agent for his application that will need to read data from a text file on the server. How can Peter accomplish this task?
The correct answer is C. Use the Session class createStream method and use the Stream class methods to get the data from the file. See the full explanation below for the reasoning.
Question
Peter is writing a Java agent for his application that will need to read data from a text file on the server. How can Peter accomplish this task?
Options
- AUse the Session class createFile method and use the File class methods to get the data from the file.
- BUse the Session class Open method and use the standard Java IO methods to get the data from the file.
- CUse the Session class createStream method and use the Stream class methods to get the data from the file.
- DUse the Session class getDatabse method, supply the name of the file instead of a database name, and use the
How the community answered
(50 responses)- A6% (3)
- B10% (5)
- C80% (40)
- D4% (2)
Community Discussion
No community discussion yet for this question.