PGAS L3 - JAVA Operators & Escape Sequences

PGAS L3 - JAVA Operators & Escape Sequences

10th Grade

35 Qs

quiz-placeholder

Similar activities

Ujian Akhir Semester PBTGM

Ujian Akhir Semester PBTGM

10th Grade

37 Qs

CB30: Unit 2 Test Review

CB30: Unit 2 Test Review

9th - 12th Grade

34 Qs

TUGASAN OFFLINE M25

TUGASAN OFFLINE M25

10th Grade

30 Qs

2.1.1 CSE Transitioning from Block to Text Coding

2.1.1 CSE Transitioning from Block to Text Coding

9th - 12th Grade

33 Qs

Java Methods 2019 (practice)

Java Methods 2019 (practice)

10th - 12th Grade

33 Qs

CS A 3.1 Boolean Expressions

CS A 3.1 Boolean Expressions

9th - 12th Grade

34 Qs

JavaScript Functions and Parameters

JavaScript Functions and Parameters

9th - 12th Grade

33 Qs

PTS Genap PEMROGRAMAN DASAR X TKJ 1

PTS Genap PEMROGRAMAN DASAR X TKJ 1

10th Grade

30 Qs

PGAS L3 - JAVA Operators & Escape Sequences

PGAS L3 - JAVA Operators & Escape Sequences

Assessment

Quiz

Computers

10th Grade

Easy

Created by

Sonia Coile

Used 2+ times

FREE Resource

35 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is the correct syntax to print a message in Java?

print("message");

System.out.print("message");

System.out.println("message");

println("message");

2.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

What is the correct way to start a class definition in Java?

class Main {

public class Main {

public Main {

class Main

3.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Which of the following is a valid single line comment in Java?

/* This is a comment */

# This is a comment

// This is a comment

4.

MULTIPLE SELECT QUESTION

45 sec • 1 pt

Which of the following is a valid block comment in Java?

/* This is a comment */

# This is a comment

// This is a comment

// This is a comment //

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does an escape sequence indicate about the character or characters that follow?

They should be ignored

They should be interpreted in a special way

They should be deleted

They should be repeated

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does the escape sequence \t represent?

A new line

A tab character

A space

A backspace

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is NOT an example of an escape sequence?

\n

\t

\s

\b

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?