Java Basics Review (And Strings)

Java Basics Review (And Strings)

9th - 12th Grade

40 Qs

quiz-placeholder

Similar activities

Strings In java

Strings In java

9th - 10th Grade

35 Qs

class 10 output

class 10 output

10th Grade

35 Qs

ย้อนหลัง กลางภาค Java ระดับต้น

ย้อนหลัง กลางภาค Java ระดับต้น

KG - University

40 Qs

2023-2024 Fall final study guide

2023-2024 Fall final study guide

9th - 12th Grade

37 Qs

PEKAN ULANGAN HARIAN  RPL

PEKAN ULANGAN HARIAN RPL

12th Grade

36 Qs

Pemrograman Berorientasi Objek 11RPL Sem 1

Pemrograman Berorientasi Objek 11RPL Sem 1

11th Grade - University

40 Qs

Java Basics

Java Basics

11th - 12th Grade

35 Qs

java

java

10th - 12th Grade

40 Qs

Java Basics Review (And Strings)

Java Basics Review (And Strings)

Assessment

Quiz

Computers

9th - 12th Grade

Medium

Created by

Nathan Lyson

Used 5+ times

FREE Resource

40 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The keyword "method" is another name for

an object

a class

a function

a variable

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is incorrect?

int count = 50.0;

int salary = 50_000;

int salary = 50_00;

all of these are incorrect

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is at the end of a line of code?
#
;
)
>

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What does a comment look like in Java?
//comment
\\comment
==comment
\comment

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which method to use to find length of a string?

length()

size()

long()

count()

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which data type gets returned from length() method in String class?

double

String

int

number

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

String txt = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";


What is the correct way to find the length of "txt" string?

int len = length(txt);

float len = txt.length();

int len = txt.length();

double len = length(txt);

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?