Intro to Java
Begin with Java: understand how a Java program is structured, write and run your first programs, store and change data in variables, and build your first classes with fields, constructors and methods.
- Beginner level
- 5 modules
- 28 lessons
- 101 tasks and questions
Syllabus
01Hello, JavaWrite and run your first Java programs. Meet classes and the main method, print text and numbers, write comments, and see how source code becomes bytecode that the JVM runs.6 lessons
02Variables and TypesStore information in named, typed variables. Learn int, double, long, boolean, char and String, Java's naming rules, and how final turns a variable into a constant.6 lessons
03Operators and ExpressionsCalculate with arithmetic operators, update variables in place, control the order of operations, convert between types with casts, and compare values to get booleans.5 lessons
04Classes and ObjectsModel things from the real world as classes. Give objects state with fields, set them up with constructors, give them behavior with methods, and make them print nicely with toString.7 lessons
05Tools and Practice ProjectsSee how Java is set up outside the browser with the JDK and an IDE, then practice everything from this course in two small projects: a trip cost calculator and a library book class.4 lessons