answersLogoWhite

0

Where, exactly, do you want to search? If it is in an array, you can loop through the array; for example like this:

boolean found = false;

for (int i = 0; i <= myArray.size && !found; i++)

{

if (myArray[i] = theNumber)

{

found = true

}

}

I didn't test this, and it may have syntax errors, but it should give you the general idea.

User Avatar

Wiki User

12y ago

Still curious? Ask our experts.

Chat with our AI personalities

ViviVivi
Your ride-or-die bestie who's seen you through every high and low.
Chat with Vivi
JordanJordan
Looking for a career mentor? I've seen my fair share of shake-ups.
Chat with Jordan
TaigaTaiga
Every great hero faces trials, and you—yes, YOU—are no exception!
Chat with Taiga

Add your answer:

Earn +20 pts
Q: A simple java program for searching numbers?
Write your answer...
Submit
Still have questions?
magnify glass
imp