Model 1: Basic Java Programming - Printing the screen Flashcards

1
Q

Strings can be concatenated in Java using

A

the + operator.

System.out.println(“My name is “ + “Inigo Montoya”)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Just like in Python, Javascript, or any other language influenced by C, you can use backslash codes.

A

\n will give you a newline,
\t will give you a tab.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

letter f in %f

A

indicates that the value will be a floating point number. For an integer, use %d.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly