How can I search an object created array in Java? -


i've made array of class artist user able enter details of artist console , saves array want able search artist allowing user enter artist name in console , if matches name of in array print out found or else not found!

use loop run through array, , in loop use if/else statement, if word entered matches array holds in spot display it, else nothing.

for(int = 0; < array.length; i++){      if(thingentered.equals(array[i])){         print out     }  } 

Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -