Question: Modify the following given Java program. import java.util.Scanner; public class Exercise1 { /** A simple static string for HTML & table header. */ private static
Modify the following given Java program.
import java.util.Scanner;
public class Exercise1 {
/** A simple static string for HTML & table header. */ private static final String HTMLHeader = " " + " " + "
" + "
A paragraph consists of a set of lines of text separated by one or more empty lines ( i.e. empty strings, see java.lang.String.isEmpty method ). You are expected to modify the supplied Exercise1.java to print just the last lines of each paragraph in HTML format.
Sample input:
para #1
welcome.
para #2: Introduction
This is a simple test line
to create a 2 line para
conclusion of inputs
This para is the last para.
It has 3 lines
3 lines including this one and 3 blank lines at end
Last paragraph with 1 line
Expected output:
ml>
-
278: Exercise 1
| welcome. |
| to create a 2 line para |
| 3 lines including this one and 3 blank lines at end |
| Last paragraph with 1 line |
