Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Fill in the code below. Specifically, create a String array that contains following values in main() : hi, hello, yo, sup, howdy, hiya, greetings Also

Fill in the code below. Specifically, create a String array that contains following values in main():

"hi", "hello", "yo", "sup", "howdy", "hiya", "greetings"

Also in main(), ask the user to input a String to search for in the array. Write a method named searchArray() that takes the users input and the array, and returns either the index of the element that matches the query or -1 if the query is not in the array. In main(), output appropriate messages to inform the user of the search result.

Can someone help me with this problem?

java

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Autonomous Database In Enterprise Architecture

Authors: Bal Mukund Sharma, Krishnakumar KM, Rashmi Panda

1st Edition

1801072248, 978-1801072243

More Books

Students also viewed these Databases questions