subject

The following is intended to return the location of the first instance of the string the user enters from the keyboard, -1 if not found. string names [] = new string[20]; //assume array is initialized system. out. println(“enter a name to search for: “); string lookingfor = scan. nextline(); int found = -1; for (int i = 0; i < names. length; i++) { if ( /* missing code */ ) { found = i; break; } } which of the following could replace /* missing code* / so that it works as intended? 1. lookingfor. equals(names[i]) 2. lookingfor. equals(names[i]) 3. lookingfor ! = names[i] 4. lookingfor. equals names) 5. lookingfor [i].equals(names[i])

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 06:40, euniceyi56
How many nibbles can be stored in a 16-bit word?
Answers: 1
image
Computers and Technology, 23.06.2019 09:30, rscvsdfsrysas3712
Why is an outfitting a workspace with video games in a technology development company considered a strategic use of money
Answers: 1
image
Computers and Technology, 23.06.2019 13:30, mads000
Drag the tiles to the correct boxes to complete the pairs. match the errors with their definitions. #name #value #ref when a formula produces output that is too lengthy to fit in the spreadsheet cell arrowright when you enter an invalid cell reference in a formula arrowright when you type text in cells that accept numeric data arrowright when you type in a cell reference that doesn’t exist arrowright reset next
Answers: 1
image
Computers and Technology, 23.06.2019 17:30, granta1
Write pseudocode to represent the logic of a program that allows the user to enter a value. the program multiplies the value by 10 and outputs the result.
Answers: 1
You know the right answer?
The following is intended to return the location of the first instance of the string the user enters...

Questions in other subjects:

Konu
Mathematics, 09.01.2020 22:31
Konu
Mathematics, 09.01.2020 22:31