IMG1184

.png
School
South Forsyth High School**We aren't endorsed by this school
Course
COMPSCIA 112223
Subject
Computer Science
Date
Dec 18, 2024
Pages
1
Uploaded by DeanKnowledgeMonkey546
Multiple Choice 1 point P Given the following statements, which options will print true? String ursa = new String("2849"); String major = new String("2849"); I. System.out.printin(ursa.equals(major)); Il. System.out.printin(ursa == major); 11l. System.out.printIn(ursa.equals("2849")); IV. System.out.printin(major == "2849"); Il and IV only 1,11l,and IV only land Il only 1,1, 1, and IV IV only Multiple Choice 1 point P Consider the following incomplete code segment, which is intended to increase the value of each digit in a String by one. For example, if num is 12345, then the resulting String would be 23456. String num = "12345"; int counter = 0; String result=""; while(/* Missing Loop Header */) { int newNum = IntegervalueOf(num.substring(counter,counter+1)); result+= (newNum + 1); counter++; System.out.printin(result); Which of the following should replace /* Missing Loop Header */ so that the code segment works as intended? counter > num.length() counter < num.length() counter < num.length() - 1 counter <= num.length() counter < num.indexOf(counter)
Background image