This is a sample solution to the challenge where you were asked to write a program that asks the user for their name, then uses the current time to determine if it is morning, afternoon or evening. Then print a message saying: Good Morning followed by the name the user entered or Good Afternoon or Good Evening.
- [Voiceover] Hi, welcome back.…How did you make out with your first challenge?…I hope you had fun, and I hope you were…successful with your challenge.…Now, I'd like to show you how I would approach…this problem and talk about the thought process…along the way.…I'll start by creating a new project in NetBeans.…File, new project.…I want it to be a Java application, so I'll click Next.…I'm gonna change the name to call it Greeting.…I'm gonna leave the check mark…so it creates a new main class, and I'm gonna click Finish.…Now I can start the coding.…
On line 18 I'm gonna replace the comment…that says to do code application logic here with my code.…The first thing we wanna do is ask the user to enter a name.…So, I need to create a string variable to hold that name.…So, I'll do string, name.…I'm gonna initialize it to an empty string.…I can do that by putting double quote, double quote,…with no spaces between.…Next, since I wanna read the name in from the console,…I need to create a scanner object.…
So, I'm gonna type scanner in equals…
- What is an IDE?
- Viewing and organizing files in an IDE
- Downloading and installing different IDEs
- Coding with shortcuts and autocompletion
- Using templates
- Finding and referencing files
- Debugging Java code in an IDE
Skill Level Beginner
1. A Quick Review of IDE Basics
2. NetBeans IDE
- 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.