This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

java help as soon as possible  RSS feed

 
ekte spiriopoulos
Ranch Hand
Posts: 217
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My code is false? the exercises it tells first to make a seqsearch and after the binary search.Also,it says when i will do search i should search on the array the Code or the surname of the student.I will use seqsearch for example the code of the student and after with the binary search the surname of the student ?is this good?What should i do guys?array is called Student[] with 10 students.
 
Tushar Goel
Ranch Hand
Posts: 934
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just have answered the same on another thread..
 
Campbell Ritchie
Marshal
Posts: 55717
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is where TG gave that answer.

Apart from the poor formatting of that code (inconsistent indentation, far too much empty space), you do not need to pass indices to any of the search methods; you simply pass a reference to the array being searched and the value being sought.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!