From the course: Java 8 Essential Training
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Hello World
- For my first Java programming exercise, I'll create a Java source code file, using a simple text editor. On Windows, I can do this using Notepad, or any other text editor I like. If you're working on Mac and you don't already have a text editor installed, you might try TextWrangler, a free text editor from Bare Bones Software. To declare a Java class, start with the keyword public. That's called an access modifier, and it means that the class I'm about to declare is available to the entire application. Then add the keyword class. And then the name of the class, which I'll simply call Main, with an upper case M. All Java class names should start with an upper case initial character. Next, add a code block consisting of a pair of braces. In most Java coding examples, you'll see the opening brace appear on the same line as the preceding keywords, and then the closing brace should go down on the next line. And can align with the first keyword, such as public. Now anything I declare…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Hello World5m 44s
-
(Locked)
Passing arguments to a console application2m 53s
-
(Locked)
Organizing Java classes in packages4m 12s
-
Creating a Java project in IntelliJ IDEA7m 28s
-
(Locked)
Taking a tour of IntelliJ IDEA3m 35s
-
(Locked)
Creating a Java project in BlueJ4m 43s
-
(Locked)
Using the Java API documentation3m 44s
-
(Locked)
-
-
-
-
-
-
-
-
-
-