Skip to content

Latest commit

 

History

History

List Of Programs and Output for Experiment 5.

file_read_display.java - Write a Java program that reads a file and displays the file on the screen, with a line number before each line by handling all file related exceptions.

1-This is Java
2-Pure java
3-Javaz

num_of_char_words_lines.java - Write a Java program that displays the number of characters, lines and words in a text file.

Number of Characters = 29
Number of Words = 6
Number of Lines = 3

file_writer_file_reader.java - Write a java program that writes your name and address into a file with help of file writer class and read the contents from file and display in the console using appropriate reader class.

Enter the name :
Millie
Enter the address :
Mills
Millie
Mills

file_int.java - Write a Java program that reads a line of integers from a file, and then displays each integer, and the sum of all the integers (Use String Tokenizer class of java.util).

The Numbers in the file are : 
1
2
3
4
5
6
7
The sum is 28