Analyze the following and select the right print result ArrayList arrstr=new ArrayList(); arrstr.add("Bashful"); arrstr.add("awful"); arrstr.add("jumpy"); arrstr.add("Happy"); arrstr.set(1, "hello"); arrstr.add(3, "hi"); arrstr.remove(2); System.out.println("the index of awful is " + arrstr.index0f("awful"));

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter8: Arrays
Section: Chapter Questions
Problem 9PE
icon
Related questions
Question
Remaining Time: 1 hour, 28 minutes, 53 seconds.
v Question Completion Status:
Analyze the following and select the right print result
ArrayList<String> arrstr=new ArrayList<String>();
arrstr.add("Bashful");
arrstr.add("awful");
arrstr.add("jumpy");
arrstr.add("Happy");
arrstr.set(1, "hello");
arrstr.add(3, "hi");
arrstr.remove(2);
System.out.println("the index of awful is
+ arrstr.index0f("awful"));
O the index of awful is -1
O the index of awful is 0
O the index of awful is 1
the index of awful is 2
Click Save and Submit to save and submit. Click Save All Answers to save all answers.
Close V
Save All Answers
exercice3.doCx
exercice2.doCx
TOSHIBA
Transcribed Image Text:Remaining Time: 1 hour, 28 minutes, 53 seconds. v Question Completion Status: Analyze the following and select the right print result ArrayList<String> arrstr=new ArrayList<String>(); arrstr.add("Bashful"); arrstr.add("awful"); arrstr.add("jumpy"); arrstr.add("Happy"); arrstr.set(1, "hello"); arrstr.add(3, "hi"); arrstr.remove(2); System.out.println("the index of awful is + arrstr.index0f("awful")); O the index of awful is -1 O the index of awful is 0 O the index of awful is 1 the index of awful is 2 Click Save and Submit to save and submit. Click Save All Answers to save all answers. Close V Save All Answers exercice3.doCx exercice2.doCx TOSHIBA
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT