
Install openjdk and the JDK, using Java 11 for this course, then set JAVA_HOME and update PATH with the bin folder and verify with java -version.
Install OpenJDK 11 on Windows by downloading from AdoptOpenJDK, copy the bin path, set JAVA_HOME, add it to PATH in system environment variables, then verify with java -version.
Install Java on Mac by following the installation steps and noting the installation location under library/java/openjdk. Create JAVA_HOME, export parts, and test the installation with the java version.
Learn jshell, the interactive Java shell, to write and run simple code without full setup, using edit mode to execute multi-line snippets and view printouts.
Learn how variables in Java store numbers, decimals, and text by declaring a type and naming the variable, then assign and retrieve values.
Learn to declare and use int variables in Java, assign values with semicolons, and evaluate expressions, while the gesture tool shows outputs and temporary variables such as dollar2.
Explore Java primitive types, their min-max ranges, and usage, including byte, short, int, long, float, double, boolean, and char, plus why string is a class.
this lecture explains var keyword in java, a type inference feature that infers a variable's type from the assigned value, with examples using int, double, and true/false outcomes.
Explore case sensitivity in Java by comparing similarly spelled variables with different capitalization, showing how Hello and hello are distinct and affect arithmetic results.
Learn that keywords in Java have predefined meanings and cannot be used as identifiers. Use identifiers to name variables, methods, or classes, while Java may add new keywords over time.
Explore how assignment and arithmetic operators in Java perform basic math, including additive, subtractive, multiplication, division, and modulus, using variables and example expressions.
Explore unary operators in Java, including plus, minus, increment, decrement, and the logical not. See how each operates on a single operand to set signs, adjust values, or negate booleans.
Explore equality and relational operators in Java, such as double equals, not equals, greater than, greater or equal, less than, and less or equal, and their boolean results.
Explore conditional operators in Java, including and or operators, showing how boolean values determine true or false outcomes in expressions like A and B and A or B.
The lecture explains how if statements in Java evaluate a condition to decide whether to execute a code block, using x increment examples when test is true.
Explore how the if-else structure controls Java execution by evaluating a boolean test, executing the if block when true, the else block when false, and noting semicolon rules and increments.
Learn how if statements evaluate conditions, use else if for multiple checks, and fall back to else, with numeric examples showing value updates.
Explore switch blocks in Java, where a value is matched against case labels of the same type, using break to exit and an optional default instead of multiple else ifs.
Explore how break statements stop fall-through in switch blocks, preventing further cases from executing, and examine examples where cases lack statements influence control flow.
Master the print statement in Java by using System.out.print and System.out.println to display variables and expressions without changing their values.
Explore how the while statement repeats a code block in Java while a condition is true, using a counter that prints Java while the counter is less than five.
Demonstrate the do-while statement by showing how it executes the body first and then tests the condition, making it run at least once even when the condition is false.
Explore Java loop basics by examining a while loop's condition and the start, end, and increment commands. Practice counting from one to five with different increments.
Learn to write for loops that initialize a counter, test a condition, and increment, printing Java output from one to four with correct semicolons and quotes.
Explore using a loop counter in a for loop to print values 1 to 5, showing access to the counter inside the loop and vary outputs based on its value.
Java arrays hold multiple int values in one variable and use zero-based indexing. Learn to declare an int array and access elements by index, such as zero yields seven.
Understand that a variable holds one value, while an array holds multiple values of the same type. Access array elements by index and print those values, not the array.
Explore zero-based array indexing in Java, and access elements by their index. Recognize that the index selects elements and beware of an array index out of bounds exception.
Explore how arrays hold elements and how to read and assign values by index, update a running sum, and note that array length is fixed while contents can change.
Learn how to obtain an array's length in Java by accessing its length attribute with the dot operator, as shown with a four-element array.
Learn to print all elements of an array using a for loop, starting at zero, ending before the limit, and incrementing the index with i++, printing each value in turn.
Learn how to sum all values in an array using a for loop by initializing a sum to zero, iterating over elements, and printing the final total.
Learn how to find the last element of an array by using the length minus one in zero-based indexing, with examples for four-element arrays.
Explore looping with the last index using the array's length in a for loop. Start at zero and stop before the length to print indices zero to length-1 using .length.
Learn how to create arrays in Java with the new keyword, specify the size, and understand how var interacts with array creation and default int values, which are zero.
Learn how multidimensional arrays use rows and columns with row and column indexes to locate elements, contrasting them with one-dimensional arrays, and understand how intersections identify specific elements.
Create a two-dimensional array with two rows and three columns, initialized to zero by default. Access and modify elements using 0-based row and column indices, e.g., [0][2] set to 90.
Learn how the for each loop in Java iterates over an array, assigning each element to a loop variable and printing its value.
Discover how methods are defined and invoked in Java, including the method name, return type, void keyword, enclosing brackets, and calling a method multiple times.
Extract repeated code into a void method named printFood in Java, simplifying a for loop that processes elements and prints foods like cheese, meat, and milk.
Explore how method return types work in Java, comparing void and non-void methods, and learn how to use the return keyword to pass int values back to calling code.
Understand how a method accepts an argument by passing a value into an int parameter like x, which is used inside the method to compute p = x * 2.
Explore object oriented programming in Java by examining objects, their state (fields) and behavior (methods), and how a class designs these objects.
Explore how a class is a blueprint for creating objects with attributes and behaviors, such as color and breed, and methods like fly, eat, and chirp.
Explore how Java's access modifiers control visibility, from default package-private to private and public. See how private members like breed stay inside the class, and how public enables external access.
Discover how static members belong to the class in Java and can be accessed directly from the class name, not through objects, and why non-static methods require an instance.
Explore how static variables belong to the class, not each object, and contrast with instance variables using two bird objects to show independent color values.
Demonstrate how static variables differ from instance variables by showing breed shared by all objects of the class, so changing it via one object updates every instance.
Explore how constructors in Java initialize objects, including default constructors, constructors with no return type, name matching the class, and parameterized constructors.
Define a constructor with a string parameter that assigns the parameter to the instance variable and prints a greeting with the name.
Explore predefined classes in Java, such as the Scanner class, and learn how System.in provides input and how input.nextLine stores and prints the entered name.
Java enables write once, run anywhere by compiling code to bytecode and distributing .class files for the JVM to run on Windows, Unix, or Marquis.
Identify the main method as the entry point for multi-class Java programs, with the public static void main(String[] args) signature that initializes and starts the application.
Learn to create and run Java programs by writing a .java file, compiling to bytecode, and executing with the java command across Windows and Mac, highlighting the main method.
Launch IntelliJ, create a new Java project, and configure a JDK from downloaded or installed sources using templates for quick code.
Explore variable scope in Java, including class scope access, shadowing with this, and why method variables cannot be accessed outside their scope.
Learn how to control a for loop with break and continue in Java, including conditions, printing formats, and how break stops the loop while continue skips to the next iteration.
Explore for loop variations in Java, including initialization, condition, and increment, with examples from zero to ten. Learn how omitting parts can create infinite loops and how break stops them.
Learn how the for each loop iterates over arrays in Java, printing each element directly without indexing, and how it compares to the traditional for loop.
Explore while loops by using a condition to repeat printing and updating X. Increment X each iteration until X reaches five, then continue with subsequent code.
Discover how the do-while loop executes the body before checking the condition, contrasting it with a while loop, using x value examples to show when it runs or stops.
Master switch statements in Java by mapping a month variable to cases, using break and default to control flow and prevent fall-through.
Learn how primitive types copy by value and non-primitive objects copy references, as in the Chuck and John examples, where changing one reference affects all tied objects.
Explore method overloading in Java with a calculator class and overloaded methods. See how the compiler selects the correct overload by signature.
Explore constructor overloading by creating a person class with multiple constructors, including default and parameterized variants, and use this to assign class fields when parameters share names.
Explore reference variables and type inference in java, showing how var infers country or person types and how object assignments affect which object is controlled.
Learn how a method can accept an object as a parameter by changing the argument type from int to a person, and determine qualification by age.
Explore how Java passes primitives by value and object references by value, showing primitives remain unchanged while methods can modify an object's state via its reference.
Define non-primitive member variables by creating country and citizen classes, then use a country object as a citizen's member variable to demonstrate object composition and access properties with dot notation.
Learn how inner classes work in Java by placing a citizen inside a country, how the inner class accesses outer members, and instantiating inner objects via an outer instance.
Explore static inner classes by treating citizen as a static member of country, allowing citizen objects to be created without a country instance, and access members with the dot operator.
Explore having multiple classes in one Java file, where only one class can be public; remove static for inner classes and treat extra classes as though they were separate files.
Explore local classes defined inside a method, with a salary field and a company string, and see how their scope and object creation stay within that method.
Learn to use static blocks to initialize static elements, and understand that the static block runs once, before the constructor, either on object creation or when accessing a static member.
Discover how init blocks in Java initialize member variables and run before constructors, allowing shared code across multiple constructors for every new object.
Java is a top programming language used in almost all areas of software development. Learning Java will put a significant boost to your skillset. This course is not just another Java course, it is designed to give learners a gentle but comprehensive education on the Java programming language.
After going through this course you will be equipped to dive deeper into other concepts of the Java programming language.
Why learn from this course
This course not only teaches you Java but also gets you up to speed with the latest Java features. Java is quickly evolving and there are better ways of solving problems, more concise than you must have seen on your old Java textbooks. You will learn not just Java but current practices in the language.
Here is what we would explore:
* Basics of Java Programming - Learn Variables, Primitives, Var Keyword
* Java Operators - Arithmetic, Unary, Equality, and Conditional Operators
* Java Conditionals and Loops - If Statements, Switch Blocks and ForLoops
* Arrays - Creating Arrays, Index Value, Multidimensional Arrays
* Methods - Parameters, Arguments, and Return Values
* Object-Oriented Programming - Class, Object, State, and Behavior
* Java Classes In-Depth - Abstract classes, Anonymous Classes, Packages...
* Java Interfaces - Interfaces, Nested Interfaces, Default Methods
* Java Wrapper Classes and Autoboxing
* Java Strings
* Java Enums
* Java Exceptions - Throw, Finally, Custom Exceptions, Chained Exceptions, Multi Catch
* Java Generics
* Java Lambda Expressions and Functional Interfaces
* Java Collections - List Interface(ArrayList, LinkedList and Vector), Set Interface (HashSet, LinkedHashSet and TreeSet), Queue Interface (PriorityQueue) and Map Interface (HashMap, LinkedHashMap and TreeMap() - Compare, Contrast and Choose