Skip to content

Latest commit

 

History

History
65 lines (38 loc) · 2.76 KB

File metadata and controls

65 lines (38 loc) · 2.76 KB

1. Introduction and Setup

[toc]


1.1. Why Learn Java?

1.2. Setup For Java

1.2.1. Java Development Kit

1.2.2. Install the JDK

1.2.3. Java in the Terminal

1.2.3.1. Mac Users

1.2.3.2. Windows Users

1.2.4. Install IntelliJ

🎗️ TODO: Write instruction for Visual Studio Code

1.2.5. Your First Java Project

1.2.6. Check Your Understanding ✅

1.3. Java Web Dev Exercises

1.3.1. Initial Setup

1.3.2. Troubleshooting

1.3.2.1. ClassNotFoundException

1.4. Java Naming Conventions

Java has some very straightforware naming conventions. These are universally used by Java programmers, and differ in some cases from the conventions commonly used in other languages.

Again, these are conventions. Ignoring them will not prevent your code from running so as long as you are following Java's naming rules. Java's identifier naming rules are somewhat hard to parse, so a good rule-of-thumb is that you use only letters, numbers, and the underscore character (_), and they should alway start with a letter.

The naming conventions are more like guidlines that rules (arrr!! 🏴‍☠️ ) and are what other Java coders expect to see when reading your code.

Identifier Type Convention Example
Package All lowercase, NO SPACES! demos.javadevelopment
org.launchcode.utlities
Class Title Case Scanner
System
Cello
Method Start with a lower case letter, and use camelCase to represent multi-word method names. nextInt()
getId()
Instance variable Start with a lowercase letter and use camelCase id
firstName
Constant All uppercase letters, words separated by underscores. MAX_INT
PI

Note: Constants in Java are variables created using both static and final modifiers.

static final Double PI = 3.14159;

Tip: If you're not sure about all these identifier types yet, that's OK.

NOTE: There's better documentation from Oracle, but the documentation provided in the LaunchCode page is from the late 1999s. I want to find a new page.


#Java