171k views
5 votes
Instructions

Using only one System.out.print or System.out.println command, write a Java program that prints the following quote. Make sure to include the quotation marks (") in your output.

"That brain of mine is something more than merely mortal; as time will show."
Ada Lovelace
The first computer programmer

1 Answer

4 votes

Here's a Java program using a single System.out.println command to print the quote:

The Java Program

public class PrintQuote {

public static void main(String[] args) {

System.out.println("\"That brain of mine is something more than merely mortal; as time will show.\" \\Ada Lovelace \\The first computer programmer");

}

}

This program utilizes System.out.println to display the quote along with the quotation marks and author's attribution in the required format.

User Hisbvdis
by
8.2k points

Related questions