- So how did you make out with the challenge?…How is your name game working?…Let's take a look at my solution, and as always, remember…that your solution might be very different.…As you can see in the "main" method,…I have the two dimensional array of names,…and then I added some additional code.…I wanted to allow the user…to execute the program more than once,…so I declared a string variable, "response",…and set it equal to "y" the first time.…I also declare a string variable, "name",…that's gonna hold the name…the user would like to search for.…
My "while" loop says, while "response" is equal to a "y",…ask the user to enter the name to search for.…Then we'll read the name in, using the "name=in.nextline",…on line 32, then I call my "searchName" method,…and I give it the two dimensional array called "names"…as well as the name that I'm trying to search for.…If the value that comes back from the method is true,…I print out the message saying "The name was found";…otherwise, I print out "The name was not found".…
- Getting started with parsing
- Reviewing data types
- Using decisions
- Creating user-defined methods
- Command-line debugging
- Exploring the Java API
- Creating and instantiating classes
- Working with interfaces
- Storing items with arrays
Skill Level Intermediate
Q: How can I make my debugger function like the author’s?
1. Command Level Programming
2. Basics Review
4. Java API
5. Simulations and Algorithm Analysis
6. Classes and Objects
7. More on Classes
8. Data Structures
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.