Java Quick Reference

Java Quick Reference

9th - 12th Grade

16 Qs

quiz-placeholder

Similar activities

C Programming

C Programming

11th Grade

20 Qs

Tin học 11 chương I

Tin học 11 chương I

1st - 12th Grade

20 Qs

Coding Quiz

Coding Quiz

6th - 10th Grade

15 Qs

2.3.1 Graph Traversal & Path Finding Algorithms

2.3.1 Graph Traversal & Path Finding Algorithms

12th Grade - University

20 Qs

ABC in python

ABC in python

9th Grade

14 Qs

DDL dan DML

DDL dan DML

12th Grade

21 Qs

Một số khái niệm về lập trình và ngôn ngữ lập trình

Một số khái niệm về lập trình và ngôn ngữ lập trình

KG - 12th Grade

15 Qs

File Handling in Python - Grade 12 CBSE

File Handling in Python - Grade 12 CBSE

12th Grade

15 Qs

Java Quick Reference

Java Quick Reference

Assessment

Quiz

Computers

9th - 12th Grade

Medium

Created by

Chanel White

Used 8+ times

FREE Resource

16 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Constructs a new string object that represents the same sequence of characters as str

String(String str)

int length()

String substring(int from, int to)

Answer explanation

This method will allow you to create a new String object.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Returns the number of characters in a String object

int length()

int long()

int getLength()

Integer(int value)

Answer explanation

This is used to get the length of a String object. It is not the same length method used on arrays.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Returns substring(from, length())

String cutLength(String str)

String substring(int from)

String substring(int from, int to)

Answer explanation

This method will return a part of a string starting at the index indicated to the end of the string.

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Returns the index of the first occurrence of a string, returns -1 if not found

boolean equals(String other)

int compareTo(String str)

int numberOf(String str)

int indexOf(String str)

Answer explanation

This returns the index number of the first letter of the string you are looking for.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Returns true if this is equal to other object, returns false if not equal

int equals(String other)

double equals(String other)

boolean equals(String other)

String equals(String other)

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Constructs a new integer object, represents the specified int value

Integer(int value)

integer(int value)

int x = value

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Returns the smallest value of an integer

getMinValue()

Integer.MAX_VALUE

Integer.MIN_VALUE

Create a free account and access millions of resources

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?