
Learn to write and run a first Java hello world program by creating Hello.java, using public static void main and System.out.println, and modify to print I love Java programming.
Write a Java program that adds two numbers read from the keyboard using a scanner, stores them in num1 and num2, computes their sum, and prints the result.
The program uses a scanner to read two integers from the keyboard with nextInt, computes the difference as num1 minus num2, and prints the result.
Multiply two integers using the scanner for keyboard input, store the result in a product variable, and print it in Java.
Learn how to divide two numbers in Java using the scanner to read input, handling integers and doubles, and display the result with a practical, step-by-step example.
Learn to determine whether a number is even or odd in java using mod two and remainder checks. See how to read input with scanner, apply if-else, and print results.
Finds the largest of three numbers by initializing largest with the first number, updating it when the second or third number is larger, and printing the result.
Swap two numbers using a third variable, read input from the keyboard with a Scanner, and print the swapped values.
Learn to compute a factorial in Java by looping from 1 to n, multiplying the running product, with input from the scanner and output of the result.
Learn to implement a Java fibonacci series printer that outputs up to n terms using a, b, and c, with user input via scanner and a loop.
Determine whether a number is a prime number using a boolean flag and a loop up to square root to test divisibility. Print whether the number is prime or not.
Learn to write a Java program that sums the first n natural numbers using a scanner input and the formula sum = n(n+1)/2, with examples for 5 and 10.
Learn to reverse a number in Java by looping through digits, updating reverse as reverse times ten plus num mod ten, and printing the reversed result.
Compute the sum of digits of a number by repeatedly taking the last digit (num mod 10) and dividing the number by ten until zero, updating a running sum.
Count digits in a number with a loop that increments a counter and divides the number by ten until zero, using Scanner input and displaying the final count.
Check whether a number is an Armstrong number by summing the cubes of its digits, using temp to extract digits with modulo ten and division.
Learn to print a multiplication table in Java by reading a number from input and looping i from 1 to 10, printing each line as n into i equals n*i.
Write a Java program to calculate simple interest using I = P × t × r ÷ 100. Read principal, rate, and time as doubles from keyboard and print result.
Compute the area of a circle in Java by inputting a radius and applying pi r^2 with double precision using math.pi and the scanner.
Compute the area of a rectangle in Java by reading length and breadth as doubles, multiplying them, and displaying the area.
Compute a triangle's area with heron's formula by inputting sides a, b, c and computing semiperimeter s = (a + b + c) / 2, then display the area.
Learn to convert Celsius to Fahrenheit using f = 9c/5 + 32, declare doubles, prompt for Celsius input, and print the Fahrenheit result with practical examples.
Learn to calculate the average of n numbers in Java by looping, summing inputs from the keyboard, and computing a double average by casting the sum divided by n.
Demonstrates finding the minimum of two numbers in Java using the conditional operator a < b ? a : b, with input prompts and a printed minimum.
Learn to find the maximum of two numbers in java using the conditional operator (ternary). Enter two numbers via a scanner and print the maximum.
Determine whether a given year is a leap year in Java by checking divisibility by four, not by 100 unless divisible by 400, based on user input.
Learn to print numbers from 1 to 10 in Java using a for loop, including single-statement syntax and println-based output formatting.
Prints odd numbers from 1 to 20 using a loop that increments i by two and prints each value.
Print even numbers 1 to 20 using a loop in Java, starting at two and incrementing by two to print 2, 4, 6, 8, 10, 12, 14, 16, 18, 20.
Learn to sum even numbers from 1 to n using a for loop starting at 2 and incrementing by 2, with the sum accumulating to 30 when n = 10.
Calculate the sum of odd numbers to n in java with a loop starting at 1 and incrementing by 2, yielding 25 for n=10 and 2500 for n=100.
Learn to print multiples of five from 5 to 50 with a Java loop on the same line, then print the ascii value of a character entered from the keyboard.
Learn to print a character’s ASCII value in Java by casting the input character to int and displaying its code, with examples like 65 for A and 32 for space.
Learn to determine if a character is a vowel or consonant in Java, handling lowercase and uppercase vowels. Use Scanner input and if statements to classify the character.
Calculate the power of a number in Java by looping to multiply the base by itself, using base and exponent inputs and updating a result starting at one.
Learn to print the squares of the first n numbers by taking input and looping from 1 to n, printing i squared. Apply this approach to print cubes.
Learn to print cubes of the first n numbers in Java by extending the square program and using i*i*i in the loop. Run to see 1, 8, 27, 64.
Prints a multiplication table in reverse order using a loop, taking a number from the keyboard and printing lines like 'num into i equals product' from i down to 1.
Learn to compute the sum of the first n natural numbers in Java using a for loop, initializing sum, reading n from input, and printing the result.
Learn how to reverse a string in Java by reading input, iterating from the end to the start, building the reversed string via concatenation, and printing the result.
Learn to check if a string is a palindrome by reversing it, comparing with the original using equals, and printing the result in Java.
Learn to count vowels in a string in Java by iterating characters, converting to lowercase, comparing against a, e, i, o, u, and printing the total.
Count consonants in a string by converting each character to lowercase, checking it's an alphabet a to z and not a vowel, and incrementing a counter to output the total.
Learn to convert a string to uppercase in Java using the toUpperCase method, read input with a scanner, and print the result.
Learn to convert a user input string to lowercase in Java. Read from the keyboard and apply toLowerCase to see all lowercase output.
Concatenate two strings in Java using the plus operator to form outputs like Hello world, and learn to read inputs with a scanner while preparing to compare strings for equality.
Compare two input strings in java with string1.equals(string2) and print strings are equal or strings are not equal, reading both strings from the keyboard via a scanner.
Learn to find the largest element in an array using Java: declare and input the array, then loop through elements, updating the largest value and printing it.
Finds the smallest element in an array by initializing smallest with the first element, looping through the array, updating when a smaller value is found, and displaying the smallest.
Learn to compute the sum of array elements in Java by looping from index 0, adding each element to a running total, after prompting for size and elements.
Learn to calculate the average of array elements in Java by summing the array, casting to double, dividing by n, and printing the average.
Learn to reverse an array in Java by taking user input, declaring an array, and looping from n-1 to 0 to print elements in reverse.
Learn to copy elements from one array to another in Java using a loop, input elements for the first array, and store them in a second array.
Learn to compute the sum of even numbers in an array using a loop that checks divisibility by two in Java, with a practical input example and resulting output.
Learn to calculate the sum of odd numbers in an array using the mod two condition, implemented in a Java program that iterates the array and prints the result.
Scan every element in an array and use modulo two to identify even or odd numbers, incrementing corresponding counters and printing the results.
Learn to implement a linear search in Java by scanning an array for a key, returning its index or reporting not found with a found flag and a break.
Learn bubble sort in Java through a step-by-step demonstration that sorts an array in ascending order using outer and inner loops, with swap logic and a temp variable.
Learn to count positive and negative numbers in a Java array using a loop and conditions, increment the counters, and print results, with zero excluded.
Merge two arrays in Java by creating a merged array of size n1 plus n2, copy elements from a and b in two loops, and display the merged result.
Find the second largest element in an array by maintaining largest and second largest initialized to the minimum integer value, updating via if‑else logic while traversing the array.
This java program finds the sum of diagonal elements in a 2d array (matrix) by declaring the array, filling it with user input using nested loops, and accumulating a[i][i].
Learn to compute the transpose of a matrix in java by swapping indices with t[j][i] = a[i][j], using nested loops, handling any row and column dimensions, and printing the result.
learn to find the sum of elements in each row of a two-dimensional matrix using nested loops in Java and print the sum for each row.
Compute the sum of each column in a matrix using column-wise traversal with nested loops over rows. The example shows column sums 24 and 26 in Java.
Learn how to determine if a matrix is symmetric in java by checking A[i][j] equals A[j][i] for all elements, using a boolean flag and loops with input examples.
Count the occurrences of a number in an array by looping through elements and comparing each to the target. Input the number to count, then display the resulting count.
Compute the gcd of two numbers using the euclidean algorithm in java, with a and b updated in a loop. The example uses 12 and 3, then 72 and 8.
Learn to compute the least common multiple of two numbers in Java using a loop that increments until both a and b divide the lcm, illustrated with 3 and 4.
Learn to convert a decimal to binary in Java by dividing by two, collecting remainders, and building the binary string from bottom up with user input.
Convert a decimal number to hexadecimal in Java by dividing by 16 and using remainders, yielding 38F from 911, then perform an efficient one-line uppercase hex conversion using Integer.toHexString.
Learn to convert binary to decimal in Java by reading a binary string, parsing with base two, and printing the decimal (e.g., 1000 → 8).
Develop a program to convert an octal number to decimal using a scanner, parsing with base eight, and printing the decimal result; example 76 equals 62, with future hexadecimal coverage.
Learn to convert a hexadecimal number to decimal by reading a hex string with a scanner, parsing with base 16, and printing the decimal result (e.g., ffff becomes 65535).
Learn to identify perfect numbers by summing proper divisors, using a Java program with a scanner, a loop to n/2, and example numbers such as 6 and 28.
Learn to find perfect numbers within a user-defined range in Java by looping from start to end, testing divisibility by i, summing i, and printing numbers whose sum equals number.
Learn to swap numbers in Java without a temporary variable, using a = a + b, b = a - b, a = a - b, with scanner input.
Learn how to check a strong number in Java by summing factorials of its digits and comparing the result to the original number.
Introduce Java functions as reusable blocks of code that perform tasks, explain built-in versus user-defined, void versus return-type, and show syntax with parameters and return values.
Explore how to check a number's palindrome status in Java using a function that returns boolean, reversing digits and comparing to the original, with 121 and 123 examples.
Read a string from the keyboard, trim leading and trailing spaces, split on whitespace, and count the words using the resulting array length in Java.
Learn how to remove all spaces from a string in Java by replacing whitespace with nothing, using a string from input, and printing the result with no spaces.
Learn how to count characters in a string in Java by reading input with a scanner and using string length to print the total character count.
Learn to count occurrences of a specific character in a string using Java. The lesson shows reading input with Scanner, looping, using charAt, and printing the result.
Define anagrams as strings with identical characters and frequencies in any order; compare two lowercased, whitespace-stripped strings by sorting their character arrays to verify equality.
Learn to remove vowels from a string in Java by reading input with a scanner and replacing vowels with nothing using replaceAll, handling lowercase and uppercase (hello becomes hll).
Implement the compound interest calculation in Java using the formula for amount and interest. Use math.pow to raise (1 + r/100) to the n*t power, then print the compound interest.
Learn to calculate the sum of array elements in Java by using a function that takes the array and returns the total.
Learn to find the maximum element in a Java array by passing the array to a static function that iterates, updates the max, and returns it to the caller.
Learn to find the minimum element in an array by using a function that traverses the array, compares elements, and returns the minimum value as an int.
Learn to print an identity matrix in Java using nested loops. The program prints 1 on the diagonal where i equals j and 0 elsewhere, for a given size n, with examples for 2x2 and 4x4.
Learn to print the upper triangle of a matrix in Java by iterating rows and columns, printing values when j >= i and zeros otherwise.
Learn to print the lower triangular part of a square matrix using nested loops and a j <= i condition, filling non-triangular positions with zeros.
Explore how recursion computes factorials by calling the function with n-1 until the base case n=0, yielding fact(n)=n*fact(n-1) (e.g., 3! = 6, 4! = 24).
Learn to print the fibonacci series with a recursive fib function. Explain recursion concepts, base case n <= 1, and how fib(n) calls fib(n-1) and fib(n-2) to generate terms.
Learn to find the sum of digits in java using recursion, by taking n mod 10 and adding to sum of digits of n/10, with a base case zero.
Explore computing the gcd of two numbers with recursion using Euclid's algorithm, where gcd(a,b) = gcd(b, a mod b) and the base case b = 0 returns a.
Compute the lcm of two numbers using recursion by applying the gcd from Euclid's algorithm and the formula lcm equals a times b divided by gcd.
Learn how to compute the absolute value of a number in Java using Math.abs, by writing a simple program that converts negative inputs to positive values and prints the result.
Create a simple Java program that uses the Math.sqrt method to compute the square root of a given number, with optional user input via java.util.Scanner and a prompt.
Learn to calculate the power of a number in Java using Math.pow by passing the base and exponent, printing the result, and compiling and running the program.
Learn to write a Java program that finds the maximum of two numbers using Math.max, with a class and print statement. Explore input from keyboard with the Scanner class.
Read two integers from the keyboard using a scanner and compute the minimum with Math.min, then display the result.
Explore rounding numbers in Java with Math.round, using Scanner input and user prompts, and see examples like 4.5 becoming 5 and 4.3 staying 4, with next topics ceiling and floor.
Learn how to calculate the ceiling value using Java's Math.ceil with double inputs, display results with System.out.println, and explore samples like 4.2 and 4.1.
Explore how to compute the floor value of a number in Java using the Math class, with examples like 4.6 and 4.9 producing 4.
Write a Java program that uses Math.random to generate and print a random number from the main method, then compile and run the code to observe outputs.
Learn to generate a random integer between 1 and 100 in Java by using Math.random, multiplying by 100, adding one, casting to int, and printing the result.
Learn to compute the natural logarithm in Java with Math.log, using a double input like ten, and know the base is e.
Learn to compute logarithms with base ten in Java using the Math.log10 function, verify that log10(10)=1 and log10(1000)=3, and see how to compile and run the program.
Learn to compute the exponential function in Java using Math.exp by creating a class, calculating e^number, and printing the results, including 737.389 for e^2 and about 2.7 for e^1.
Demonstrates computing the sine of an angle in Java with Math.sin, using Math.PI, and verifying sine(90)=1 and sine(45)=1 over root two.
Learn to compute the cosine of an angle in java with math.cos, demonstrating zero angle where cos equals one, and show basic code changes, compilation, and a tangent preview.
Write a Java program to calculate the tangent of an angle using sin theta cos theta and Math.tan, illustrated with 45 degrees yielding about one.
Demonstrates converting degrees to radians in Java, using pi equals 180 degrees and 30 degrees equals pi/6, with code printing about 3.14.
Convert radians to degrees in Java with Math.toDegrees, showing pi rad and pi/2 as 180 and 90 degrees, and note a future right-triangle hypotenuse calculation.
Calculate the hypotenuse of a right-angled triangle using math.hypot with x and y, demonstrating the Pythagoras theorem and a 3,4 example, then compile and run the Java program.
Compute the power of e in Java by printing Euler's number and using Math.pow for e to the power of two, then preview calculating a circle area with Math.PI.
Learn to compute the area of a circle in Java using the pi constant, following the formula pi r^2, and print results.
Demonstrate printing the current time in milliseconds using System.currentTimeMillis in a Java program, storing the value as a long, and printing it with System.out.println.
Learn to print the current time in nanoseconds in Java by using System.nanoTime. Declare a long variable, print it with System.out.println, and compile and run to see the nanosecond timestamp.
Demonstrate exiting a Java program with System.exit(0), printing a message using System.out.println, and running a compiled program to observe the exit behavior.
Learn how to print all environmental variables in Java using System.getenv(), iterating over key-value pairs with a for-each loop, and printing each variable name and value.
Learn how to print all system properties in Java using System.getProperties with a for-each loop, displaying key=value pairs such as Java specification version 23 and user country.
Retrieve the operating system name using System.getProperty('os.name') and print it, showing whether your OS is Mac OS X, Windows, or another system.
Learn to print the Java version in a simple program by using System.getProperty(java.version) and printing the result. The example shows version 23.0.2.
Learn to display the Java home directory by retrieving the system property java.home, storing it in a string, and printing the path after compiling and running the program.
Teach how to display the current username in Java by using System.getProperty and printing the username variable, while following simple file-naming practices to stay organized.
Explore object oriented programming in Java by defining objects and classes, understanding state and behavior, and learning how inheritance, polymorphism, abstraction, and encapsulation drive class design.
Demonstrate how to create a class with a void display method that prints a student name using an object and a main method, as shown with Bob and stack memory.
Demonstrate a class with multiple objects by creating a car class with model (string) and year (int), instantiate C1 and C2 as BMW 2020 and Audi 2025, then print models.
See how a Java class uses a constructor to initialize object attributes with this, shown in an employee example, and how the constructor is invoked when objects are created.
Demonstrates how a default constructor is provided by the compiler when no constructor is defined, creating a book object with a null title and a display method.
Learn how to implement a parameterized constructor in a book class, initialize the title and price, and display them using a display method in the main method.
A Java class named student demonstrates constructor overloading with a no-argument and a parameterized constructor for name and age, while main creates s1 and s2.
demonstrate encapsulation in Java by using an account class with a private balance and public setters and getters that validate input greater than zero and show an invalid balance message.
The lecture demonstrates simple inheritance in Java, with a dog class extending an animal, using eat from the parent and bark, via a main method.
Demonstrates multi-level inheritance in Java by building animal, mammal, and dog classes, each with eat, walk, and bark methods, and invoking them on a dog object to print actions.
Learn method overloading in Java with add methods for int and double in a calculator class, and see how the same-named methods are chosen by parameter types.
Explore the concept of a Java interface as an abstract blueprint for classes, defined by the interface keyword, implemented in classes using implements, and governing abstract methods.
Discover how the this keyword references the current object in Java, differentiating instance from local variables using this.name and this.value, illustrated by a person class example.
Explore how to use the super keyword in Java to call a parent class method from a subclass, with an animal and dog example.
Demonstrate passing an object as a parameter in Java by using a student class, its constructor, and a display method invoked through a static showStudent that takes a student object.
This lecture demonstrates the copy constructor in Java by creating a second student object from the first, showing shallow copy versus deep copy and copying name and age.
Explore constructor chaining in Java by using this to call another constructor within the same class, with default and parameterized constructors initializing name and id.
Explore implementing a nested class in Java, defining an outer class with an inner class, and creating the inner object via the outer instance to access fields.
Demonstrate a lambda function for addition in Java, using an anonymous function with an interface to sum two integers and print the result.
Learn to compute a square using a Java lambda function by implementing a square interface with a calculate method and printing the result, such as 5 squared equals 25.
“This course contains the use of artificial intelligence.” AI is used for promo video only.
Looking to start your programming journey but don’t know where to begin? “150+ Java Programming for Absolute Beginners” is your ultimate step-by-step guide to mastering Java from scratch. Whether you’re a complete newbie or someone wanting to strengthen your coding foundation, this course is crafted to make learning Java simple, practical, and fun.
With over 150 hands-on programs, you’ll dive straight into coding from day one. Each program is designed to teach key Java concepts including variables, data types, operators, loops, arrays, functions, object-oriented programming, exception handling, and more. You won’t just memorize theory—you’ll apply what you learn in real-world examples, giving you the confidence to tackle programming challenges independently.
By the end of this course, you will:
Understand and implement core Java concepts.
Build and debug 150+ practical programs.
Gain problem-solving skills and logical thinking techniques.
Be prepared for coding interviews, software development projects, and further programming courses.
This course is structured for absolute beginners, using clear explanations, visual examples, and step-by-step instructions that make learning enjoyable and effective. With lifetime access, you can learn at your own pace and revisit lessons anytime.
Start your journey to becoming a confident Java programmer today! Unlock opportunities in software development, web applications, Android development, and more by mastering the language that powers some of the world’s most popular technologies. No prior experience? No problem! By the time you finish this course, you’ll have a solid foundation and a portfolio of 125+ programs that showcase your new skills.