Absolute Java (6th Edition)
Absolute Java (6th Edition)
6th Edition
ISBN: 9780134041674
Author: Walter Savitch, Kenrick Mock
Publisher: PEARSON
bartleby

Concept explainers

Expert Solution & Answer
Book Icon
Chapter 2, Problem 1STE

Explanation of Solution

Given: The line of code:

String s = “Hello� + “Joe�;

System.out.println(s);

To find: The output of the string:

String s = “Hello� + “Joe�;

System.out.println(s);

Solution:

The statement is written in Java language.

In the line: String s = “Hello� + “Joe�;

There is a variable which has the string as a data type. The two words, Hello and Joe, are concatenated by the + (plus) symbols.

System.out.println(s);

This line will provide the output, HelloJoe, which is the value of the string variable. The statement System.out.println is provided for showing the output on the console

Want to see more full solutions like this?

Subscribe now to access step-by-step solutions to millions of textbook problems written by subject matter experts!
Students have asked these similar questions
What is the output produced by the following lines of program code?char a, b;a = 'b'; System.out.println(a);b = 'c';System.out.println(b);a = b;System.out.println(a);
What is the output produced by the following lines?System.out.println(2 + " " + 2);System.out.println(2 + 2);
What output is produced by the following statements? String s = "Hello" + "" + "Joe"; System.out.println(s);

Chapter 2 Solutions

Absolute Java (6th Edition)

Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
  • Text book image
    Microsoft Visual C#
    Computer Science
    ISBN:9781337102100
    Author:Joyce, Farrell.
    Publisher:Cengage Learning,
Text book image
Microsoft Visual C#
Computer Science
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Cengage Learning,