
A very important note for what follows!
Explore building a Java program from a text editor and command line while installing Visual Studio Code extensions, including the Java Extension Pack, to write, test, and debug Java apps.
Learn to compile a Java program with Java C, direct class files to a bin folder, and run it with java, while practicing Bash and Visual Studio Code.
Learn how to configure the git editor in bash, choosing between vim, nano, or code, and set global core.editor and related environment variables for persistent editor settings.
Learn to use git branches, create and switch to a test branch from master, work on separate code copies with commits and pushes, then merge back to master.
Learn how build systems replace eclipse builds for large projects. Explore Ant, Maven, and Gradle, and practice using them from the bash shell before integrating with Eclipse.
Install Maven to use the command line or follow along in Eclipse, download from Apache.org, configure it, and verify by running mvn.
Import existing maven projects into Eclipse using File, Import, Maven, Existing Maven Projects, then browse to the git repository root to import multiple projects at once.
Create a Maven project from scratch in eclipse by selecting the Maven archetype quickstart, configuring groupId and artifactId, and generating the project in a Git repository.
Explore a guava multiset example, showing how to create a hash multiset, add elements, and print them, while illustrating how maven streamlines jar management and project imports.
Explore how Gradle structures a Java project with build.gradle and settings.gradle. See how Gradle resolves repositories, organizes sources under src/main/java and resources, and uses tasks like build and run.
Create a Gradle-based Eclipse project to work with a SQLite database by adding a SQLite driver dependency and refreshing the Gradle project, with guidance on working sets and dependencies.
Create a user table in a database using sql: define id as integer primary key and name as not null text, using create table, drop table, and if not exists.
Insert data into a table using SQL insert, then query with a JDBC result set and display id and name for Bob and Mary.
Explore prepared statements for safe, efficient data insertion and reuse of SQL. Bind parameters for IDs and names with placeholders to prevent SQL injection and enable repeated inserts.
Implement a functional database class with connect and disconnect methods using DriverManager and a URL, handling exceptions and testing the connection in App.java.
Create a user class in a Java project to mirror a database table, with id and name, constructors, getters, setters, and an autoincrement primary key in MySQL or SQLite.
Learn to save users using a DAO pattern by establishing a database connection, using prepared statements to insert a user name, and wrapping SQL exceptions in a runtime DaoException.
Learn to retrieve users with get all and find by id using a DAO, executing select id, name from user, iterating the result set, and building a user list.
Implement deletion of a user by id using a prepared statement, execute the update, and handle SQL exceptions with a try-catch.
Move database settings from hardcoded values to a properties file in src/main/resources/config/db.properties, load it via getResourceAsStream, build the connection URL, and handle errors with try-catch.
Explore integration testing with JUnit in a Java project and contrast unit testing with integration testing. Learn how tests connect to a database and consider in-memory or fake databases.
Learn to write a JUnit test for the profile class by configuring a dedicated test resources folder, loading test properties, and asserting the loaded database name matches 'people test'.
Write a JUnit test to verify saving multiple users. Implement a get max id method to retrieve the highest autoincrement id from the user table and validate saved records.
Write a test for the get all method by ordering results with id in the sql, then compare retrieved and expected users using a sublist and size checks.
Demonstrate writing a step-by-step JUnit test to verify the delete method, using multiple test users, selecting a mid-list target, and confirming alignment of database and retrieved lists after deletion.
Call methods via the reflection API by obtaining a declared method and invoking it on an instance, using setAccessible to bypass private access and handle IllegalAccessException.
Learn how to define and use annotation attributes, set default values, enforce primitive and array types, and mark fields as primary keys to map fields to database columns.
Learn how to extract attribute values from field annotations in Java, iterate fields, handle empty annotations, read values and isKey, and derive field and column names for database mapping.
Discover and learn advanced aspects of Java programming, and some important Java-related concepts and technologies.
This course can help you bridge the gap between the knowledge you have as a self-taught Java developer, junior developer or new IT graduate, and the knowledge that professional developers may have.
We'll introduce you to version control, important design patterns, JDBC, and many other important Java technologies and programming concepts, including Spring, Swing and multi-tier architecture.
When you finish the course you'll be able to create simple web services in Java using Spring MVC, and connect to them using desktop clients.