Ask Question

Suppose your name was George Gershwin. Write a complete main method that would print your last name, followed by a comma, followed by a space and your first name.

+2
Answers (1)
  1. 20 March, 14:47
    0
    Following is the program in Java Language

    public class Main / / main class

    {

    public static void main (String[] args) / / main method

    {

    System. out. println ("Gershwin, George"); / / display value

    }

    }

    Output:

    Gershwin, George

    Explanation:

    Following is the description of Statement:

    In this, we using the System. out. println () to print the value in the console window. The System. out. println () is used in java is used to print the data in the console. In this, we pass the "Gershwin, George" string in the double quotes along with a comma between them.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Suppose your name was George Gershwin. Write a complete main method that would print your last name, followed by a comma, followed by a ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers