
Create your first hello world program in Eclipse by building a Java project, adding a class with a main method, printing hello world to the console, and running it.
Explore declaring and initializing Java variables using primitive types such as int, short, long, float, double, char, boolean, and byte, and print values with System.out.println.
Learn how to implement a while loop in Java, using a boolean condition and an updating number to terminate the loop, prevent infinite loops, and observe iterative output.
Master for loops in Java by structuring initialization, condition, and update; print values and messages, use printf with %d format specifiers, and manage newlines.
Learn how to use if statements in Java with boolean variables and comparison operators, including equals versus assignment, and how else if and break control loops.
Explore reading user input with the scanner class in Java, creating a Scanner(System.in), prompting users, and handling strings, integers, and decimals with basic robustness notes.
Explore Java comments and variable scope. Implement a do-while loop that prompts for a number until nine, using a scanner and understanding local versus class scope.
Learn to use switch statements in Java to branch on user input, with cases and a default, and understand the optional break and its fall-through behavior.
Explore arrays in Java by declaring and initializing int arrays, mastering zero-based indexing, default values, and iterating with a for loop to print elements.
Explore multidimensional arrays in Java, including two-dimensional arrays, arrays of arrays, varying lengths, zero-based indexing, and iterating with nested for loops to print and access elements.
Learn the basics of classes, objects, and methods in Java, including public class limits, the main method as entry point, and creating objects with new to call and print strings.
Explore return types and method parameters in Java, including void and returning values. Learn to pass typed arguments in the correct order for practical calculations.
Learn how java packages structure code, prevent class name conflicts, and support imports across packages and subpackages, using reverse-domain naming to ensure unique package names.
Explore constructors in Java by creating instances, initializing fields, and overloading with zero, one, or two parameters; use this to reference instance variables and call other constructors.
Learn the difference between static (class) and non-static (instance) variables and methods, how static access works, and how final constants and object counting illustrate their use.
Explore inheritance by creating separate classes, extending a factory into a car, and calling design and build. Master public, protected, default, and private access modifiers with their rules.
Explore polymorphism in Java by using a vehicle superclass and car subclass to demonstrate dynamic method binding, method overriding, and passing subclass objects where a superclass is expected.
Master casting in Java across byte, short, int, long, float, and double, including default decimal literals and the f suffix for floats. Recognize truncation risks and string conversions using Integer.parseInt.
Explains interfaces in Java by defining a display information contract, implementing it in computer and vehicle classes, and using interface types to invoke common behavior across objects.
Explore how anonymous classes extend a class or implement an interface on the fly, with examples using a computer and a phone interface, and the override annotation.
Read a file line by line in Java with the scanner class and a file object. Manage paths, backslashes, exceptions, and closing the scanner.
Discover how stringbuilder enhances string concatenation by enabling in-place modification, unlike immutable strings, and learn to append, toString, and method chaining for efficient memory use, especially in loops.
Learn how the Java toString method provides a string representation of an object by overriding it in an employee class with id and name, so printing shows id and name.
Learn how to implement meaningful object comparison in Java by overriding equals (and hashCode) to compare by selected fields, and use dot equals for strings while understanding reference equality.
Master the ternary operator, a three-operand boolean conditional. See examples capping values, comparing numbers, and finding a minimum in an array.
Set up a java word-guessing game with a start method. Use a do-while loop to show blanks, read input, and check it; words class supplies a random word via toString.
Use Java's Random to pick a word from an array, initialize a letters array for guesses, and output hyphens with revealed letters, plus consider StringBuilder for efficiency.
Continue refining game logic by replacing the if-else with a single line ternary operation. Handle user input with a scanner, send guesses to the words class, and update displayed letters.
Create a boolean is guessed right method to check the letters array for any null characters, signaling a win; manage rounds and reveal the word on victory.
Explore exceptions in Java by reading a non-existent file with a scanner, demonstrating a throws declaration and try and catch blocks, and showing how stack traces guide debugging.
Explore how to declare and handle multiple exceptions in java, including io exceptions, parse exceptions, and file not found, using throws clauses, try-catch, and multi-catch.
Explains Java runtime exceptions and why unchecked errors need not be caught, highlighting division by zero, null pointer, and array index out of bounds, and stresses fixing underlying program flaws.
Learn how abstract classes in Java define a base vehicle for common engine functionality, prohibit instantiation, and use abstract methods like drive across subclasses such as car and truck.
Explore inner classes in Java, including non-static and static inner classes, with practical examples like a machine and its tire to illustrate scope and access to outer data.
Explore lambda expressions in java, comparing blocks of code passed to methods with anonymous classes, leveraging functional interfaces, type inference, and returned values for cleaner code.
Explore how enums in Java represent a fixed set of values using a color example, declare enum constants, and use features like switch, name, valueOf, and custom methods.
Explore how to serialize Java objects to a file, write and read vehicle objects using object streams, and handle serialization via the Serializable interface.
Serialize and deserialize arrays and array lists of vehicle objects, using the serializable interface, and control serialization with the transient keyword to ignore fields.
Understand Java hash maps by creating a map<Integer, String>, adding with put, retrieving with get, and iterating with entrySet, while noting duplicate keys overwrite and unordered results.
Explore linked hash maps and tree maps, showing insertion order preservation versus natural-order sorting; use the map interface to iterate keys and values.
Explore hash set, linked hash set, and tree set to manage unique elements, preserve order, sort data, and perform contains, iteration, and retain, remove all set operations.
Discover how to sort lists in Java using Collections.sort and comparators, including alphabetical and reverse alphabetical sorts, string length-based ordering, and integer sorting in natural and reverse order.
Explore the two main ways to start threads in Java—extending the thread class or implementing runnable—and learn to use thread.start, run, and sleep for concurrent execution.
Discover how the volatile keyword ensures visibility in Java by preventing caching of shared data across threads, addressing interleaving with thread synchronization.
Explains multiple locks in a Java multithreading scenario by using two separate locks for two lists, with synchronized blocks on firstLock and secondLock to update concurrently and preserve list sizes.
Learn how thread pools and the executor service manage multiple runnable tasks. Submit them to a fixed thread pool and observe concurrent execution, shutdown, and awaiting completion.
Explore countdown latch in Java, a thread-safe class to synchronize multiple threads, using await and countDown with a fixed thread pool to run six tasks until the latch reaches zero.
Explore Java multithreading by using wait and notify in a two-thread scenario that releases and consumes energy, employing synchronized blocks and intrinsic locks to coordinate resume with user input.
Explore re-entrant locks as an alternative to the synchronized keyword through a two-thread example that protects a shared value and uses await and signal with proper unlock in finally.
Explore switch expressions in Java, an enhanced alternative to switch statements that use arrows, avoid breaks, and return values with yield, improving readability and flexibility across data types.
Learn how the var keyword enables type inference in Java with examples like var a = 100 and var e = true, and note its limitations.
Learn how text blocks in Java simplify printing multiline content by using triple quotes, preserving new lines for addresses, JSON, HTML, and paragraphs without manual string concatenation.
Explore sealed classes in Java 17 to limit inheritance with permits, enforce immediate extension, and choose final, non sealed, or sealed subclasses, including sealed interfaces.
Explore virtual threads in Java 21, replacing traditional threads with a lightweight, runtime-managed concurrency model that reduces memory use and improves resource utilization, while preserving familiar syntax.
Java 21 introduces unnamed classes and unnamed variables as preview features. Compile with --release 21 and --enable-preview, run with java --enable-preview, and use underscores for unnamed variables.
Discover the sequence set in Java 21, an extension of sequence collection and the set interface, including get first, get last, remove first, remove last, and reverse.
Explore the sequence map interface in Java 21, including first/last entry, poll, put first/last, reversed, sequence entry set, sequence key set, and sequence values, with a linked hash map.
Run your Spring Boot application with an embedded Tomcat on port 8080, then observe a localhost:8080 error page until you add a rest controller in the next lecture.
Create a Spring Boot rest controller that exposes a root endpoint returning 'my application' on localhost:8080, using @RestController and @GetMapping.
Explore how Maven, a project management tool, handles dependencies and builds Java apps by downloading spring and hibernate jars from the central repository and using a configuration file.
Learn the standard Maven project structure with pom.xml and folders like source main Java, resources, web app, source test, and target, enabling integrated development environment support and easier builds.
Explore Maven concepts through the pom file as the project object model, and learn about project data, dependencies, plugins, and declaring groupId, artifactId, and version from the central repository.
Learn the Spring Boot project structure: Maven directories like source main java, resources, and test, plus Maven wrapper files and pom with Spring Boot starters and packaging runnable jars.
Configure Spring Boot with application.properties, set a custom server port, inject properties with @Value, and review static resources, templates, and the unit test file.
Discover how spring boot starters simplify getting started with spring projects by providing curated maven dependencies for web, security, data jpa, and more, and view starter contents in your IDE.
Discover how the spring boot starter parent provides maven defaults, inherits dependency versions, and allows overriding the Java version while running with mvn spring-boot:run.
Add the spring boot dev tools dependency to your Maven pom to enable automatic restart on code changes, and configure IntelliJ to auto-build so the app reloads automatically.
Enable spring boot dev tools for automatic reloading by updating the pom.xml. Run the app and test the /learning and /gaming endpoints to verify live reload.
Add spring boot actuator to expose health and info endpoints. Update pom.xml and application.properties to enable /actuator/health and /actuator/info, then run the app to view endpoints.
Add the Spring Boot starter security dependency to the pom file to secure actuator endpoints, keep /health available, and set login via spring.security.username and spring.security.userpassword in application.properties.
Secure rest endpoints by adding Spring Boot Starter Security, verify login with the default user and generated password, and customize or exclude health and info endpoints in application.properties.
Define custom properties in the application.properties file and inject them into a Spring Boot app using the @Value annotation, with properties like instructor.name and student.class, no extra coding required.
Define and inject custom properties in application.properties using the add value annotation, then expose a class info endpoint returning the instructor name and student class (john smith, java class j02).
Explore Spring Boot properties and configure server port, context path, logging, actuator, security, and data source in application.properties.
Configure Spring Boot server by changing server.port to 8585 and setting the context path to /myapp in application.properties, then verify endpoints like /myapp/classinfo, /myapp/learning, and /myapp/gaming after restart.
Explore inversion of control by outsourcing object creation to a spring container acting as an object factory, enabling language-agnostic instructors, and configuration via Java annotations or Java source code.
Explore Spring dependency injection using the Spring container to assemble objects via inversion of control, with constructor and setter injections and auto wiring.
Explore constructor injection by wiring a Java instructor into a course controller via a defined interface and spring bean, and expose the programming exercises endpoint with a rest controller.
Explore how constructor injection works behind the scenes in Spring, with the framework creating instructor instances and injecting them into course controller, and previewing Spring's database access, and rest APIs.
Initialize a spring boot project using start.spring.io, select maven, Java, non-snapshot spring version, add dev tools and spring web, generate, unzip, and open in IntelliJ.
Define an instructor interface and implement it as a Spring bean, then expose a REST endpoint through a constructor-injected controller that returns programming exercises.
Spring Boot automatically scans components from the main application package and subpackages, registering beans in the spring container, and you can add base packages to scan.
Learn how to explicitly configure Spring Boot to scan base packages by listing com.example.spring.core.tutorial and com.example.edu, verify injection and successful startup, then rely on default component scanning when possible.
Apply setter injection by wiring dependencies through setter methods annotated with @Autowired, as Spring creates and injects the instructor implementation into the course controller.
Demonstrate setter injection in Spring by creating a setter method annotated with @Autowired in the course controller, showing any method can receive injected dependencies.
Explore field injection with @Autowired, observe direct private-field injection by Spring, and note why it's discouraged for unit testing compared with constructor and setter injection.
Explore annotation-based autowiring and qualifiers to resolve bean implementations for an instructor interface. Learn to use @Qualifier with bean ids like javaInstructor to ensure injection in constructors and setters.
Explore qualifiers in Spring to resolve multiple interface implementations by switching constructor injection among Java, PHP, and Python instructors, using component and qualifier annotations.
Use the primary annotation to designate a single instructor among multiple implementations. Respect that the qualifier annotation has higher priority and can override the primary choice.
Learn how to resolve multiple Spring bean implementations by marking one as primary, eliminating the need for qualifiers and ensuring the correct instructor is injected.
Learn how lazy initialization defers bean creation in Spring Boot by marking an instructor as lazy, enabling global lazy initialization, and observing delayed logs until endpoints are accessed.
Demonstrates how bean scopes control the lifecycle and sharing in Spring, highlighting the default singleton, and how prototype, session, request, and global session scopes create instances, with qualifiers guiding injection.
Explore bean scopes in Spring by examining constructor injection, qualifiers, and singleton behavior. Learn how removing lazy initialization and configuring beans affects scope in a Java Spring Boot context.
Create a new endpoint to check bean scope by comparing instances; singleton returns true, prototype returns false, and demonstrate switching to prototype to observe differing results.
Explore bean lifecycle methods in Spring, from container startup and dependency injection to custom init and destroy logic using post construct and pre destroy annotations for initialization and cleanup.
Explore Spring bean lifecycle methods by wiring a singleton bean with post construct and pre destroy annotations, defining init and clean up methods, and observing prototype scope nuances.
Configure a bean for the C instructor via a configuration class, use a bean id converter, and inject it into the course controller to enable the Fahrenheit to Celsius exercise.
Hibernate and JPA act as a layer over JDBC, using JDBC for all database connections and handling save and retrieval of objects via the JPA API.
Unzip scripts, set up spring-hibernate-jpa project, and log into MySQL workbench. Create the employee schema and table (id, first name, last name, email) and prepare to insert data.
Set up a spring boot project with Hibernate and JPA, configure the data source via application properties, and use the EntityManager for queries, leveraging Spring Initializr and auto configuration.
Create a Spring Boot project via the initializer, choose Maven and Java, add the MySQL driver and Spring Data JPA, generate, unzip, and rename to crud app dash employee.
Set up a Spring Boot web app in IntelliJ, register a command line runner bean, configure JDBC properties for a MySQL database, test the connection, and disable the startup banner.
Map a Java class to a database table with JPA annotations, map fields to columns, and define a primary key using identity, with Hibernate as the default JPA provider.
Create a Java entity class mapped to the employee table with JPA annotations, defining id, first name, last name, and email, plus constructors, getters, setters, and toString.
Implement a crud application using the DAO pattern with JPA to save an employee via the entity manager in Spring Boot.
Define a data access object package and an employee dao interface, then implement it with a repository class that injects an entity manager and persists employees within a transaction.
Learn to set a MySQL auto increment start value using alter table to begin at 2000, verify changes, and reset to one with truncate, then reinsert data.
Read an object by its primary key using entityManager.find in a crud app. Update the Dao interface and main application to support find by id and display the result.
Add and implement a find by id method in the DAO using the entity manager to retrieve an employee by key in JPA. Test by saving and reading the employee.
Explore how to query multiple objects using JPQL in JPA, using entity names and fields, predicates, like, and named parameters.
Implement a find all method in the employee dao using a typed JPQL query with the entity manager. Fetch and display the list; sort by last name ascending and descending.
Learn to query objects with JPA by adding a find by last name method, building a typed JPQL query with named parameters, and returning results via the entity manager.
Learn how to update a JPA entity using entity manager find, setter, and merge, and perform bulk updates with a query to change multiple records, with transactional handling.
Update a JPA entity in a Spring Boot app by adding an update method in the employee DAO, using @Transactional and entityManager.merge to modify by ID.
Learn to implement delete operations in a JPA DAO using EntityManager, including finding by id, removing entities, and a bulk delete all method with transactional updates.
Hibernate with JPA annotations creates database tables from Java code and generates SQL automatically, using the ddl-auto options to guide development, testing, and production considerations.
Develop Rest APIs and web services with Spring, using Rest controllers, JSON over HTTP, Postman, and building a weather data crud interface via a third-party service.
Explore json syntax as a language independent data format for storing and exchanging data, including objects, name-value pairs, numbers, strings, booleans, null, and arrays.
Learn how rest over http enables crud operations with post, get, put, and delete, and implement a Spring Boot rest controller with request and response messages and Postman testing.
Learn to use Postman to send HTTP requests, test get, post, put, and delete methods, and explore JSON responses with nested objects using fake APIs.
Develop a Spring Boot REST controller by wiring a REST service, expose /test/greeting via a GET mapping, and test with browser or Postman using Spring Boot starter web.
Set up a Spring Boot project from start.spring.io with Maven and the latest Spring Boot, add web dependency, generate and unzip, then create a rest controller with /test and /greeting.
Define a Spring REST controller with @RestController and @RequestMapping for /test and /greeting, returning hello. Run the app and test GET /test/greeting with Postman, seeing 200 and the hello response.
Explore how data binding turns JSON into Java objects and back, with Jackson in Spring automatically using setters and getters to handle the conversion.
Develop a Spring REST service that returns JSON list of employees at /api/employees, using Jackson to convert Java employee objects via get mapping, with hard-coded data and DB integration later.
Explore building a Spring Boot REST API by creating a controller and an employee entity, wiring endpoints under /api, hard-coding sample employees, and returning JSON via Jackson.
Refactor rest controller to initialize data once with add post construct, then expose endpoints for listing employees and retrieving by path variable, using list indices as IDs.
Handle Spring REST exceptions with a custom json error response, including an employee not found exception, and a 404 payload with status, message, and timestamp.
Learn to handle missing data in Spring Boot by building a custom error response, defining an employee not found exception, and returning a JSON 404 via an exception handler.
Explore Spring Boot exception handling by implementing custom JSON error responses for employee lookups, including 404 not found and 400 bad request scenarios, with endpoints and tests.
Learn how to implement global exception handling in Spring Boot using @ControllerAdvice, moving exception handling from a single rest controller to a reusable, project-wide solution for all controllers.
centralize global exception handling in Spring Boot using a controller advice class, move exception handlers from the rest controller, and test custom 404 and 400 messages for employee endpoints.
Design a spring rest api by reviewing requirements, identifying the teacher entity, and applying http methods to perform full crud on the /api/teachers endpoint.
Build a Spring Boot rest API for a teacher directory with CRUD operations, connecting a MySQL database via Spring Data JPA, using a rest controller, service, and dao layers.
Configure IntelliJ for Spring Boot dev tools, update application.properties with a MySQL data source, and build a teacher entity and DAO interface with proper annotations.
Build a Spring Boot teacher DAO by implementing the interface, wiring an entity manager via constructor injection, and exposing a REST controller with an API/teachers endpoint to return all teachers.
Define and implement a teacher service as an intermediate layer between the rest controller and daos, using the facade pattern to aggregate data from teacher, courses, and skills daos.
Define a teacher service interface and its implementation, inject a dao via constructor with @Autowired, and bridge the rest controller to the dao, testing the /api/teachers endpoint for all teachers.
Implement dao methods to get a single teacher, save or update via the entity manager's merge, and delete by id. Move transactional annotation to the service layer, remove from dao.
Explore implementing full crud in the teacher dao, including find by id, add, update, and delete, using entitymanager find, merge, and remove to ensure latest data is returned.
Implement service methods in Spring Boot dao part two: find by id, update, and delete in the teacher service; use transactional for update and delete and delegate to the dao.
Explore rest controller methods to retrieve a single teacher by id and to add a new teacher with an auto-generated id. Practice json payloads and content-type headers in post requests.
Define a post endpoint to add a new teacher via Spring Boot REST API, binding JSON from the request body, zeroing the ID to force insert, and testing with Postman.
Implement a Spring Boot put mapping in the rest controller to update a teacher via JSON body with id and updates, returning the updated teacher.
Delete a teacher by id with Spring Boot REST endpoint at /api/teachers/{teacherId}, validate existence, delete by id, and return deleted teacher id; test with Postman and verify in MySQL Workbench.
Explore how Spring Data JPA replaces custom DAO code with a repository interface that auto-generates CRUD methods for entities like teacher, courses, and books, reducing code by about 70%.
Create a Spring Data JPA teacher repository and replace dao usage across the service and controller. Demonstrate full crud operations and optional find by id with Postman and MySQL Workbench.
Discover spring data rest and learn how it automatically exposes rest endpoints from your jpa repositories with no coding, via the spring boot starter data rest dependency.
Enable spring data rest by adding the spring boot starter data rest dependency to auto expose jpa repositories as endpoints, and customize the base path to /my api for testing.
Update a teacher by id using PUT with Spring Data REST, placing the id in the URL. Do not include the id in the JSON body.
Learn how spring data rest exposes entity endpoints, customize pluralized paths with repository rest resource, and configure pagination and sorting, including default page size, max page size, and zero-based pages.
Expose the instructors endpoint with Spring Data REST, and demonstrate pagination and sorting by last name, including zero-based pages and a default page size.
Configure basic REST API security with Spring Security by defining in-memory users Bob, Alice, and Emma, assigning roles teacher, manager, and admin, and demonstrating no op and bcrypt password encoding.
Set up a security configuration and in-memory user details with Bob, Alice, and Emma, assigning roles (teacher, manager, admin), and verify access to the /api/teachers endpoint using basic authentication.
Restrict access to REST endpoints by role in Spring Security, assigning teacher read access, manager create/update, and admin delete, using request matchers, HTTP methods, and has role checks.
Configure a Spring Boot rest api with a security filter chain, define request matchers for teacher, manager, and admin roles, enable http basic authentication, and disable csrf for stateless calls.
Test role-based access control in a Spring Boot REST API by verifying read access for Bob and blocking unauthorized create, update, and delete operations.
Illustrate role-based access control for a rest api by showing how manager and admin permissions regulate get, post, put, and delete on /api/teachers, with 403 for unauthorized delete.
Migrate hard-coded users to a database using spring security jdbc authentication with users and authorities tables, configuring maven dependencies, properties, and security settings.
Learn jdbc authentication with spring security by creating users and authorities tables, inserting sample users with bcrypt encoding, and assigning roles such as teacher, manager, and admin.
Switch from hard coded users to JDBC authentication using a data source and JDBC user details manager, enabling database read of users and authorities for role-based security.
Explore bcrypt encryption in spring security, hashing plaintext passwords, generating 60-character bcrypt hashes, and validating logins via jdbc authentication.
Learn to implement rest api security with custom spring tables by configuring jdbc user details, bcrypt passwords, and roles queries, then test with postman on /api/teachers.
Do you want to learn how to code and land a cool Java programming job? Java is a really popular language for creating applications and websites. Now is a great time for Java programmers to find jobs and freelance gigs.
This course is taught by experienced instructors certified by Oracle, who have guided over 500,000 happy learners and received thousands of 5-star reviews. The instructors bring a wealth of expertise to guide you through the learning process.
The course covers each topic and makes things easy with simple examples.
We’ll dive deep into Java, Spring Framework, Spring Boot, Spring MVC, and Hibernate, with the latest updates included. Each topic is broken down with simple and practical examples to help reinforce your learning.
Mastering these technologies can open exciting doors in the tech industry. Spring is widely adopted by employers, making these skills highly valuable. This course not only provides you with essential knowledge but also offers hands-on practice to solidify your skills.
Whether you're a complete beginner or looking to enhance your existing knowledge, this course is designed for all learners. Don’t miss this opportunity to boost your career and become part of the vibrant Java development community.
Enroll today and embark on your journey to mastering these in-demand skills!