Are you taking CLEP classes? Try clep.ai
| preferred AP College board partner for AP classes
AP Computer Science A/Unit 1: Primitive Types
Start Practice TestPractice Test
About Exam
easy Solved by 4 students

Java Print vs Println Methods

Mark
< Prev
Next >

What is printed to the console when the following program is run?

public class PrintTest {
    public static void main(String[] args) {
        System.out.print("Line1 ");
        System.out.print("Line2");
        System.out.println(" Line3");
        System.out.println("Line4");
    }
}
A

Line1
Line2
Line3
Line4

B

Compilation Error

C

Line1 Line2 Line3 Line4

D

Line1 Line2 Line3
Line4

Hint
Did You Know?
Explain Why
Explain All Answers
Check Answer
Show Correct Answer
Report Question

Question Leaderboard

Rank
User
Correct Count
Attempt Count
Total Time
Score
#1patrickmeijer00922 0m 26s 174
#2lsj0803092211 0m 12s 88
#3jeonsaw172311 40m 41s -2,341
Items per page:
10
1 – 3 of 3

AI Tutor

How can I help?

APFIVE © 2020.
Email: apfive@apfive.org|Privacy Policy|