Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Can someone help me out with this Java code? Thank you: Write a Java program tha

ID: 3665590 • Letter: C

Question

Can someone help me out with this Java code? Thank you:

Write a Java program that will print out a 3 line message with at least 3 rows of text encapsulated by equal marks.
For example:

=========================
Line 1
Line 2
Line 3
=========================

An outline of the program is below. Complete it as follows:
a. In the documentation at the top, fill in the name of the file the program would be saved in, your name and a brief description of what
the program does.

b. Add the code for the main method to do the printing.

Remember the following:
The name of the class must match the name of the file (but without the .java extension).
The main method must be inside the class definition (between the first { and the last}).
The statement that prints the message must be inside main.

Compile and run your program. When it works correctly, modify it so that it prints the different lines of text.

Explanation / Answer

Program in Java, comments are given in bold letters.

//CLASSNAME- Priting
//AUTHOR- XYZ
//DESCRIPTION- PROGRAM TO PRINT OUT THREE LINE MESSAGE

class Printing //class name is decleared
{

   public static void main (String[] args) throws java.lang.Exception //main method
   {
       System.out.println("========================="); //print message to get the output
       System.out.println("Line 1");
       System.out.println("Line 2");
       System.out.println("Line 3");
       System.out.println("=========================");
       System.out.println("");
   }
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote