filename.rb
class Abc
public static void main(String[] args) {
System.out.println("Hello." + "How are you?\n I'm fine.");
}
}
Use "+" to concatenate strings. Since line breaks cannot be made in the middle of a string literal, the indent can be cleaned up by using it when the string is too long to fit on one line. You can also use the newline character "\ n" to start a newline. In this case, "I'm fine" is displayed with a line break.
Recommended Posts