String Method Review

Description

Quiz on String Method Review, created by Shannon Anderson-Rush on 05/10/2020.
Shannon Anderson-Rush
Quiz by Shannon Anderson-Rush, updated more than 1 year ago
Shannon Anderson-Rush
Created by Shannon Anderson-Rush over 3 years ago
1185
0

Resource summary

Question 1

Question
Consider the following code segment: String newString = "Welcome"; String anotherString = "Home"; newString = anotherString + "Hello"; What is the value of newString?
Answer
  • HomeHello
  • HelloHello
  • WelcomeHello
  • Welcome Hello
  • Home Hello

Question 2

Question
Which of the following returns the last character of the string str?
Answer
  • str.substring(0);
  • str.substring(0, str.length());
  • str.substring(length(str));
  • str.substring(str.length()-1);
  • str.substring(str.length());
Show full summary Hide full summary

Similar

A2 Geography- Energy Security
sophielee0909
C1 - Formulae to learn
Tech Wilkinson
OCR Biology AS level (f211) flashcards/revision notes
Dariush Zarrabi
BIOLOGY B1 5 AND 6
x_clairey_x
Biology AQA 3.1.5 The Biological basis of Heart Disease
evie.daines
Forces and their effects
kate.siena
Biology -B2
HeidiCrosbie
Sociology- Key Concepts
Becky Walker
Longevidad y Envejecimiento Fisiológico
Isaac Alexander
FV modules 1-4 infinitives- ENTER ENGLISH
Pamela Dentler
General Pathoanatomy Final MCQs (301-400)- 3rd Year- PMU
Med Student