
Install java 21 via sdkman on macos and install the IntelliJ IDE community edition via homebrew; switch between java versions and verify installations.
Learn to install the latest Java development kit with OpenJDK 21 and set up IntelliJ IDEA Community on Windows using Chocolatey, PowerShell as administrator, and a correct PATH.
Install the Java development kit (JDK) version 17 on macOS by downloading the arm64 dmg installer from Oracle and running the installer, then verify with java -version.
Download and install the IntelliJ IDEA community edition, select the right OS build, and ensure compatibility with Java 17 and Gradle.
Ask for help by posting a detailed question in the lesson Q&A, including your operating system, Java version, and the failing code, and share snippets via Git and GitHub gist.
Discover over 100 practice exercises in a downloadable PDF, with a GitHub repository of solutions and margin notes to guide you through class objects, methods, and other Java foundations.
Learn how to use varargs in Java to pass a variable number of arguments to a method, comparing to arrays, using ellipses, and accessing elements.
Exercises & Supplements for "Classes, Objects & Methods" Module.
Please find the link to the coding exercises provided by the web site, w3resource, in the resources section of this lesson. The exercises are meant to be used for this whole module.
Master removing whitespace in Java by using strip and trim to clean leading and trailing spaces, and explore strip leading, strip trailing, and strip indent with text blocks.
Discover how the Java contains method checks if a string includes a given sub string with exact matches, using seven in four score and seven years ago as an example.
Learn how the endswith and startswith methods verify file name patterns, such as ensuring a string ends with .txt and begins with file, return booleans, and demonstrate method chaining.
Use contentEquals to compare string contents for equality across strings, string buffers, and string builders. Discover how contentEquals handles character sequences and returns booleans, and how it differs from equals.
Please refer back to the last lecture/article in Section 1, "Coding Exercises for Whole Course"
Learn to use capture groups in regex to extract phone-number digits, including country code up to two digits, area code, exchange, and line number.
Expand phone number parsing to accept optional parentheses and country code in North American formats using escaped parentheses and optional groups.
Learn how regex in Java uses the dot to match any character, anchors like caret and dollar, and classes such as word, digit, and non-space, with boundary and ASCII notes.
Learn to find multiple matches in a multi-line string with Java's regex engine, using Pattern and Matcher, named capture groups, and start/end indexes.
Please refer back to the last lecture/article in Section 1, "Coding Exercises for Whole Course"
Explore hexadecimal, a base-16 system using 0–9 and A–F, and how it compresses binary and decimal data. See nibble concepts, byte alignment, and memory addresses represented in hex.
Explore how floating point numbers are stored in memory, compare float and double, and learn why binary representation yields approximation that impacts money calculations.
Move beyond Math.random by using java.util.Random, call nextInt with an upper bound, and optionally seed the generator; for stronger needs, try SecureRandom with a byte[] seed.
Translate physics formulas into Java by computing path velocity, centripetal acceleration, and centripetal force through modular, overloaded methods using mass, radius, and period.
compare numbers in Java using equals (==) and not equals (!=), differentiate from the assignment operator (=), and cover greater than or equal to, less than or equal to checks.
Discover how BigDecimal fixes precision issues when using float or double by instantiating with strings for exact values, and use its methods like subtract for precise decimal arithmetic.
Explore key big decimal methods for precise math, including add, subtract, multiply, divide with math context, and handling non-terminating decimals. Learn sqrt, max and min, absolute value, and remainder operations.
Explore how to instantiate big decimal and big integer, including string vs primitive constructors, and learn about precision loss when using doubles, plus conversions to byte, int, and string.
Develop a Java compound interest calculator using BigDecimal to compute future balance from principal, rate, years, and annual contributions, applying the one plus rate to the power of years.
Please refer back to the last lecture/article in Section 1, "Coding Exercises for Whole Course"
Explore inequalities in conditionals with if-else statements, use relational operators, and combine conditions with logical and and logical or, plus modulo, to classify numbers and set colors.
Demonstrates using the switch statement to route on a value with cases and breaks, including default, illustrated with numbers and strings, and contrasts with if-else and null handling.
Showcase switch expressions in java 14, using arrow syntax and yield to return values, including blackjack card value logic, ace handling, and parsing integers from cards.
Please refer back to the last lecture/article in Section 1, "Coding Exercises for Whole Course"
The Maven coordinates I used in this lecture are:
org.junit.jupiter:junit-jupiter
You can copy this and paste it into the window where you saw me paste it too.
Explore test-driven development by creating a second unit test for adding numbers, running tests, and refining code to pass while reducing duplication through setup and refactoring.
Analyze how to test randomness in a Java number-guessing game by using an array tally approach to verify a fair 1–10 number spread.
Learn how to debug Java code with an IDE by setting breakpoints, stepping through lines, inspecting variables, and reloading changed classes during debugging.
Master debugging with breakpoints, conditional stops, and view breakpoints; learn when to step over, avoid third-party code, and reinforce bugs with tests and automated builds.
Please refer back to the last lecture/article in Section 1, "Coding Exercises for Whole Course"
Revisit object-oriented concepts like classes and models to deepen your understanding of Java's power. Explore remaining concepts to unlock foundational skills and elevate your Java development.
Windows (and maybe Linux) users may have trouble displaying the card suit characters on the console in this lesson. If so, you may need to do the following:
Go to menu:
Help / Edit Custom VM Options... /
In the editor that opens, add the following two lines to the end:
-Dconsole.encoding=UTF-8
-Dfile.encoding=UTF-8
Then, restart IntelliJ.
Introduce four role specific classes, programmer, manager, analyst, and CEO, to refactor the salary program from procedural to object oriented, with constructor based parsing and a get salary method.
Refactor by creating a base employee class and pull up common fields, reducing duplication among programmer, manager, analyst, and CEO, while updating constructors and using extends and protected members.
Learn how to extract responsibilities from a main class by introducing a factory method on the employee class to instantiate role-based subclasses, simplifying code and improving maintainability.
Explore nested classes in Java, comparing static nested classes and inner classes, and learn about anonymous and local nested classes, including when to use each for accessing enclosing fields.
Use instanceof and pattern matching to differentiate programmer and manager outputs while iterating employees, replacing get class checks with type aware printing in Java 16.
Explore the new features of Java 21, including switch pattern matching, records for programmer data, and unnamed patterns to simplify guards on lines of code per day.
Please refer back to the last lecture/article in Section 1, "Coding Exercises for Whole Course"
Explore how to model a chessboard in Java, including a chessboard class, chess piece hierarchy, and coordinates, and walk through adding and retrieving pawns using chess notation like A2.
Explore implementing knight move validation in a Java chess board, including preventing moves to invalid squares, blocking friendly occupancy, and capturing enemy pieces with captured piece tracking.
Discover how Java collections store objects with dynamic size, compare them to arrays, and explore the collections framework’s interface-driven hierarchy from list to map.
Explore lists as dynamic, ordered collections that grow beyond arrays, use generics to store employees safely, and iterate with enhanced for loops to total salaries.
Learn quick list creation with array list and list.of, and remove items by object or index, while exploring iterator use and basic patterns across lists, sets, and maps.
Explore advanced list methods in Java, including add at a specific index, add all, contains, indexOf and lastIndexOf, remove, subList, retain all, set, toArray conversions, and unmodifiable lists via List.of.
Sort lists with the list sort method and a comparator, using anonymous classes or lambdas, and explore Arrays.sort and Collections.sort. Implement comparable for natural ordering in strings and employees.
Explore the set interface and learn how hash sets prevent duplicates, compare them with lists, and understand hash codes, contains checks, and the performance implications.
Learn how a linked hash set preserves insertion order while filtering duplicates via equals and hashCode, and compare it to hash set's performance and lack of random access.
Explore how the TreeSet filters duplicates and orders items using a comparable implementation or a comparator, illustrating how last name versus first name affects results.
Explore how maps in the Java collections framework store key-value pairs, enabling lookups and data association, with common implementations: hash map, tree map, and linked hash map.
Learn how to implement a get salary method in a Java main class, write JUnit 5 tests, and switch from list traversal to a hash map for fast lookups.
Transform lookups by building a map from first names to salaries, using hash map, tree map, or linked hash map; observe how keys update with duplicates and retrieval is fast.
Explore common map methods in Java, including get, put, values, keySet, entrySet, containsKey, getOrDefault, isEmpty, putIfAbsent, remove, and putAll, with examples showing insertion order and entry iteration.
Please refer back to the last lecture/article in Section 1, "Coding Exercises for Whole Course"
Explore the streams api by re-implementing text processing with lines into employee objects using map, forEach, and method references, showcasing lambdas and a pipeline approach.
Explore how to create streams from collections and arrays, use stream, of, range, and boxed methods, map operations, and read lines from files.lines, including null handling and empty streams.
Learn to sum employee salaries with the streams API by mapping text to employee objects and then to salaries. Use mapToInt and sum to compute total, and print the results.
This lesson has one downloadable resource in it, which is a data file (a CSV files) containing 5,000,000 sample records (may take a while to download, it's 629 MB) for us to practice Streams techniques on. Please download this file to your computer and unzip it to a location to be accessed by your Java code as you follow along with the following lessons.
This file originally came from: https://eforexcel.com/wp/downloads-16-sample-csv-files-data-sets-for-testing/ if you'd like to download it directly from its original source or look at other files there.
Learn to use streams API to sum salaries by mapping arrays to a domain model, then collect results using a record-based person.
Group records by state using the collect method’s grouping by, returning a map of string to list of person, and alphabetize results with a tree map, illustrated with spreadsheet visuals.
Learn to group data by a field and apply summing and formatting with Java collectors, producing a state-to-salary map and neatly formatted key-value results.
Learn to nest grouping by state and gender in Java streams, aggregate salaries, and format results as currency using a tree map.
Please refer back to the last lecture/article in Section 1, "Coding Exercises for Whole Course"
Note: This course is intended for absolute beginners to programming OR those who don't mind a slower pace to learning Java. If you're looking for a faster-paced course, this may not be for you (though you can play back at 2x speed & may still find great things to learn). Also, even for those who already know some basic Java, you could skip over the parts you already know and focus on those you may not, like Regex, Streams/Lambdas API, Optionals, Date/Time, SQL/Database/JDBC sections that even seasoned Java developers may not know as well as they should. Many of my sections on these APIs are as long or longer than MANY stand-alone courses dedicated to just one of these topics - for similar prices. Check out my preview videos from each of those sections to gauge how deep I go into each topic.
If you're interested in starting a new career as a professional software developer, learn the fundamentals from an instructor who has interviewed, hired, managed & mentored numerous developers over the years. This course will teach you all the REAL Java skills you need to land your first job and excel. It focuses on skills you're actually likely to use most often and tries to de-emphasize more "academic" knowledge. The instructor has taken his experiences and observations of both successful and unsuccessful developer candidates to create a course that tries to ensure success in landing highly-coveted developer roles
In this course, you'll learn such topics as:
Object Oriented Programming (OOP)
Too many so-called "Java" developers have learned the syntax of the language but have no idea how to harness its actual power to write sophisticated software that's easier to maintain and collaborate on.
Regular Expressions
Another unfortunate observation is that a majority of Java developers are very weak with Regular Expressions. This is unfortunate because so much of what Java tends to be used for, involves processing text and checking that it is valid or parsing key information out of it. Without the use of Regular Expressions, these tasks require considerable amounts of error-prone code that is inflexible and difficult to maintain.
Functional Programming with Lambdas & Streams API
Another sore-spot among a large number of Java developers. As of 2023, Java 21 is out, but the Functional programming APIs of Lambdas & Streams were introduced into Java with version 8. We've observed that developers simply aren't keeping up with these powerful (not-so-new anymore) techniques that help keep Java competitive and efficient in an increasingly functional programming world. You can sift through large datasets with ease and significantly less code with these APIs.
Optionals
Tony Hoare, the inventor of the programming concept of "null", called its invention his "billion-dollar mistake" dating back to 1965. That mistake has gone on to wreak havoc across numerous programming language ever since. Optionals seek to remedy that mistake. Unfortunately, not enough Java developers have learned and embraced the power of using Optionals. This topic seeks to remedy that shortcoming
Java 8 Date/Time API
Java was introduced in 1995 and heralded as the great, shiny new programming language of our time. To a large degree, one could argue that it is indeed, that. However, mistakes were made along the way. One of those mistakes was the way dates & times were handled. Java 8 made major strides in fixing those mistakes, but as with Optionals, Lambdas and many other topics mentioned, not enough developers have taken the time to learn the new and greatly improved Java 8 Date/Time API. We'll show you how to keep time the right way.
Working with Databases & SQL
One of the topics where it seems Java developers actually have kept up (mostly) is in learning modern ways to work with databases in Java - primarily through the use of frameworks like Spring Boot. However, one unfortunate side-effect of the massive levels of abstraction these frameworks afford us, is that many developers have little-to-no idea of what these frameworks are doing or how to use them to maximum effect. We'll peel back the covers and give a solid foundation of the basics to better empower developers as they inevitably continue to use frameworks to make this work easier.
An Introduction to The Spring Framework & Spring Boot
The Spring Framework & its sibling, Spring Boot, have absolutely revolutionized modern Java software development - particularly for business. Dare I say virtually no company doing Java these days, even considers doing it without Spring or at least one of its few and much less popular competitors. You WILL have to learn Spring to be a true and well-rounded Java developer competitive in the job market. Though this course if focused on the fundamentals of Java, we knew we had to whet your appetite for the full(er) stack of Java development. Spring is what most companies use to enable their Java applications to become web applications and web services and talk to databases. This module will set you up for Neutrino's upcoming course dedicated to the topic in full (because it deserves its own course).
So, if you're willing to put in the work, come join us and begin the next phase of your career.