CodeHS & Runestone: Chapter 1

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/3

flashcard set

Earn XP

Description and Tags

Computer Programming; Period 1

Last updated 3:37 PM on 2/24/25
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

4 Terms

1
New cards

What will this code segment output?

System.out.println(“Hello”);
System.out.println(“World”);


a. Hello
World

b. HelloWorld

c. Hello World

d. Hello


World

a. Hello

World

2
New cards

Which code segment will print “Hello Karel” to the screen in Java?


a. System.out.printLine(“Hello Karel”);


b. print “Hello Karel”;


c. System.out.print(“Hello Karel”);


d. System.println(“Hello Karel”);

c. System.out.print(“Hello Karel”);

3
New cards

What will this code segment output?


public class Printing

{

public static void main(String[] args)

{

System.out.println(“*****"):

System.out.println(“****");

System.out.println(“***");

System.out.println(“**");

System.out.println(“*");

}

}

a. This won’t print anything.


b. *

**

***

****

*****

c. It will only print the first line as ***** since only one print statement can be used


4
New cards

What is the correct syntax for writing the main method in Java?