Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I have a method in java that takes a string argument and return Boolean value. In the contractor of the same class I have 3

I have a method in java that takes a string argument and return Boolean value.

In the contractor of the same class I have 3 arrays, and each array has 3 objects. (Each array is coming from different class)

So this method should search in the toString of the 3 arrays in the constructor and return true if the user input a value exist in the toString and false if it is not exist.

I used for loop to search in the arrays, it is working if the user inputs a value that exist in all the 3 toStrings. But if the user input a value that exist in one of the toStrings it keeps evaluate to false.

I want the method to evaluate to true if one of the loops evaluates to true.

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

Step: 3

blur-text-image

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

1 2 3 Data Base Techniques

Authors: Dick Andersen

1st Edition

0880223464, 978-0880223461

More Books

Students also viewed these Databases questions

Question

6. Explain the strengths of a dialectical approach.

Answered: 1 week ago

Question

2. Discuss the types of messages that are communicated nonverbally.

Answered: 1 week ago