This repository contains small Java projects and guides for beginners.
There are three markdown files that will lead you thru a series of steps to learn some beginner Java programming.
You will use jshell to learn about variables, methods, and classes.
Make sure you TYPE the snippets from the markdown files into jshell.
Not typing, doing copy/paste, will not help you learn (and is cheating at this point of the course)
Use a browser to be able to see the markdown files.
Start with JavaSmall.md and follow the links to the other guides:
- JavaSmall.md - Learn Java basics with the interpreter
- VARS.md - Understanding Java variables and types
- ClassPerson.md - Creating and using Java classes
- Type, don't copy-paste - Build muscle memory
- Experiment freely - Java interpreter (jshell) is forgiving
- Use meaningful variable names - Java encourages readability
- Pay attention to indentation - Java uses whitespace to keep things clean
- Read error messages - Jshell error messages are helpful
It's weird. When using jshell, you use one file extension, when using javac (the Java compiler) you a different one.
- Jshell files:
.jsh - Java files: Must be saved as
.javafiles