Write a program called FileInput to read an int, a double, and a String form a text file called 'test.txt', and produce the following output: a. The integer read is 24, b. The floating point number read is 70.94, c. The String read is 'Archangel', d. Hi! Archangel, the sum of 24 and 70.94 is 94.94. (Hint use Scanner to read from file)


Updated: Oct. 2, 2023 — Training Time: 2 minutes
Overseen by: Archangel Macsika
Topic: Java Programming

Difficulty: Intermediate.

Companies who previously asked this: -.

Objective: Write a program called FileInput to read an int, a double, and a String from a text file called test.txt, and produce the following output:
a. The integer read is 24
b. The floating point number read is 70.94
c. The String read is "Archangel"
d. Hi! Archangel, the sum of 24 and 70.94 is 94.94
Hint: use Scanner to read from file.

Input: Read an int, a double, and a String from a file.

Expected Output: Result will vary based on the data in the file..

Sikademy Solution

Was this training resource helpful?