
Explore the basics of Java, including exception handling, input/output, and object-oriented programming. Learn to connect to databases.
This lecture introduces Java basics: a platform independent, object oriented language released in 1995 by Sun, with write once and run anywhere and bytecode interpreted by the Java tool machine.
Explain the Java runtime environment and the Java development kit, how the Java Virtual Machine runs and manages memory, and how Java 11 unifies the JDK and JRE.
Install Java 11 using the Oracle JDK, download the JDK 11 for Windows, and set the path with the bin folder and environment variables to compile and run Java applications.
Download Eclipse, unzip it, install the Java Development Kit, set a workspace, create a simple Java project, and run a hello world to verify compilation and execution.
Install MySQL by downloading the Windows installer, configure the root password and a user for localhost, start the MySQL server, set path variables, and verify databases with show databases.
Create a Java project with a package and class, learn case sensitivity and camel case naming, write a main method to print to the console, and run as Java application.
Learn about basic data types in Java such as byte, short, int, long, float, double, char, and boolean, and how memory usage and precision guide type choice.
Discover how classes serve as blueprints for objects in Java, create constructors, instantiate student objects, and use this to reference fields, while understanding multiple constructors and memory management.
explains how methods work in Java, including constructors, access modifiers, and return types; demonstrates a student class with fields, a showStudent method, and printing with System.out.println.
Learn how access modifiers control visibility in Java, including public, private, protected, and default, and see how static class variables differ from instance members with constructors and static methods.
Identify local, instance, and static variables. Local vars live on the stack and must be initialized; instance vars live on the heap; static vars are a single copy.
Master basic operations in Java by performing addition, subtraction, multiplication, and division with integers and floating-point numbers. Use the modulo and comparison operators to evaluate expressions.
Explore for loops and while loops in Java through initialization, boolean conditions, and updates, with examples that increment by 1 or by 2 and print results.
Explore using the while loop in Java to repeat actions while a condition holds, print a counter, and compare transforming it with the for loop.
Explore how if statements in Java decide whether to run code based on conditions. Use numeric and string comparisons to print results, such as a number smaller than a hundred.
Explains how to define and use one-dimensional arrays in Java, with integers and strings, demonstrating zero-based indexing, array length, and iterating via for loops and for-each loops, and printing items.
Explore sorting one-dimensional arrays in Java by converting them to lists and using Collections.sort, which uses merge sort for reference types like strings and quicksort for primitives.
Master the Java switch statement by handling numeric and string cases, using break to prevent fall-through, and defining a default case for unmatched inputs.
Explain how Java passes primitive parameters by value and objects by reference, using examples with integers and a person’s age to show effects on callers.
Write to and read from a text file using buffer writer and buffer reader, via a system line separator, specifying the file, reading lines, and closing streams.
Explore Java exceptions, including checked (compile-time) and runtime (unchecked) exceptions, plus errors, and see how try-catch handles issues like file not found and array out of bounds exception.
Learn to declare and throw exceptions with throws, handle file not found errors using try-catch, and ensure execution via finally blocks in Java.
Explore inheritance in Java by examining how a subclass derives properties from a superclass, using protected access, the super keyword, and method overriding to model an is-a relationship.
Explore composition in Java by modeling has-a relationships through class fields, selecting composition over inheritance; demonstrate with a car having tires, an engine, and doors.
Master method overriding in Java by extending person with student, using protected say hello and super call to customize behavior, and learn final modifiers on methods, fields, and classes.
Discover polymorphism, an object’s ability to take many forms. See how a Student extends a Person, so a Student can be referenced as either a Student or a Person.
Explore abstraction in Java by using abstract classes and methods, enforcing inheritance and overriding to implement concrete shapes like circle and rectangle, and leveraging polymorphism for flexible design.
Encapsulation bundles data and methods into a single object, hides internal state with getters and setters, and uses constructors, as one of the four pillars—encapsulation, inheritance, polymorphism, and abstraction.
Learn how interfaces define behaviour with abstract, default, and static methods, and how classes implement them to achieve abstraction and polymorphism through multiple interfaces.
Learn JDBC basics as the Java database connectivity API connects applications to databases, uses the driver manager to choose the right JDBC driver, and supports Oracle and other databases.
Learn to connect to a database using the Maia's Q connector and the driver. Establish a localhost connection, create a database, run queries via a statement, and close the connection.
Create a students table in the task database with id as integer not null primary key, and fields for first name, last name, email as varchar(255), and age as integer.
Learn to insert values into the students table using java database connectivity. Build an insert query for id, first name, last name, email, and age, then verify with a select.
Learn how to fetch data from a database using Java, execute an SQL query, iterate through results, and print first name, last name, email, and age while closing resources.
Hi!
This course is designed for students or anyone else who want to start Java as a programming language. We will consider several topics ranging from installing Java itself to MySQL database operations. The first chapter will be about the basics: loops, decision making, variables and so on. The next chapters will be about exception handling as well as how to deal with input/output operations. Of course, we will consider the object orinted principles: inheritance, polymorphism and encapsulation as well. The last chapter will be about how to connect to a MySQL database and how to make the basic database-related operations: inserting new items, removing items or updating items in the database table.
Hope you will like it!