
Master Java logical programming with numbers, palindrome checks, strings, recursion, arrays and matrices, patterns, and essential sorting and searching algorithms including bubble sort, quicksort, insertion sort, linear and binary search.
Explore how this course uses short and to the point lectures with hands-on assignments. Install Java and IDE, join QA sections, and practice with new programs.
Download all the completed projects or clone the repository on GitHub to run, refer to, and explore the Java logical programs and data structures for beginners.
Learn to build a Java program that reads an integer, validates it as positive, then prints even or odd using the remainder operator, and demonstrates illegal argument handling.
Determine leap years by checking divisibility: four with an exception for century years, unless divisible by 400; read input with a scanner and display leap or not.
Create a Java class credit card issuer that validates a credit score and issues silver, gold, or platinum cards. Use 400-600 silver, 600-800 gold, 800-850 platinum; invalid for others.
Build a digit extractor in java that reads a number with a scanner, uses a while loop with num % 10, prints digits, then updates num with num / 10.
Learn to compute the sum of digits in a number by reusing the digit extractor logic, accumulating digits with a sum variable in a loop, and printing the result.
Learn to compute the sum of prime digits in a number by checking digits 2, 3, 5, and 7 in a Java program, building on a sum of digits template.
Learn to count the digits in a given number by using a loop and a counter in Java, printing the total digits as the program runs.
Identify a duck number in Java by scanning digits for an interior zero, using a boolean flag and early exit to print if the number is a duck or not.
Learn a Java technique to reverse an integer by extracting digits and building the reversed number in a result variable.
Learn how to determine if a number is a palindrome by reversing digits and comparing with the original, using a number reverser and palindrome checker in Java.
Explore a second approach to reversing a number and checking for palindrome in Java by reading input as a string, reversing with a string buffer, and comparing results.
Convert a given integer to binary by repeatedly dividing by two and storing remainders in an array, then reversing the array to print the binary representation.
Learn the inbuilt Java approach to convert integers to binary using Integer.toBinaryString, run examples with 25 and 9 to display binary representations.
Implement a Java Fibonacci series generator that prints a user-specified number of terms starting with zero and one by summing the previous two numbers.
Demonstrate recursion logic by implementing the Fibonacci series in Java, comparing a recursive approach with a non recursive version and printing the first n numbers based on user input.
Implement the fibonacci series recursively in Java, with a private static function and base cases, then take user input and print values 0 to n-1.
Learn to determine Niven numbers by summing the digits and checking if the number is divisible by that sum, with refactored code to a separate sum method.
Determine special two-digit numbers by extracting the digits, summing them, multiplying them, and checking if the sum plus the product equals the original number; no loop required.
Learn to print prime numbers in a range by testing divisibility and skipping one. Implement an inner loop to check divisors and print primes.
Implement a Java perfect number check by summing proper divisors with a static isPerfect method. The program prompts for a number and prints the result.
Check if a user-entered number is an Armstrong number by summing the cubes of its digits and comparing to the original number, using digit extraction in Java.
Reverse a string by starting at the end and appending each character to an output string in a Java for loop inside a String Reverser class.
Reverse a string in Java using the StringBuffer reverse method, compare it with a for loop approach, and apply the concept to palindrome examples like malla a alum.
Count words in a string by scanning characters and counting whitespace in Java. The lecture guides reading input, looping through the string, and printing the final word count.
Use the string class and the split method to count words in Java with the array length, showing a single-line solution compared to a for loop.
Learn to determine if the first string ends with the second string by comparing two strings from their ends, counting matches, and printing yes or no.
Count each character's occurrences using an ASCII index in a 256-length array, then identify the index with the maximum value to reveal the maximum occurring character.
Develop a Java string search that detects the substring gold in input by converting to lowercase and using nested loops with a found flag to print when gold is found.
Learn to remove vowels from a string in Java by iterating characters and building a non-vowel output with a string buffer, or by using a replace all regex approach.
Learn how to duplicate every character in a string using a Java string buffer and a for loop, turning ABCD into aabbccdd and similar inputs.
Learn to print even-length words from a sentence in Java using two approaches: string tokenizer and split. Build tokens, iterate through words, and print those with even lengths.
Replace each input character with the next in the character set using a for loop to build output; it highlights ASCII handling when converting back.
Check if a string's characters are in order by sorting its character array. Compare the sorted string to the original input and print true or false.
Learn to detect duplicate consecutive characters in a string using a simple Java program that scans the string, compares adjacent chars, and prints true when found, otherwise false.
Explore how to find the middle of a string, returning one character for odd lengths and two middle characters for even lengths, using Java substring.
Recursion is a function calling itself, shown with factorials: factorial n = n * factorial(n-1). Stop at the base case zero, returning one, to avoid infinite loops.
Demonstrate a Java recursion example that computes factorials. Implement a static factorial function with a base case when num equals one and multiply down to yield 120 for five.
Learn to compute the sum of numbers up to n using recursion in Java, with a base case at n <= 1 and return n plus sum(n-1).
Implement a Java recursion example that computes power with a static power(base, exponent) method, returning base multiplied by power(base, exponent-1) until exponent reaches one.
Learn to build an array from user input by specifying its size, filling it with integers using a scanner, and printing the array to the console.
Learn to sum even elements in an input array by iterating with an index, checking a[i] % 2 == 0, and accumulating in sum, then display the result.
Learn to write a Java program that sums negative and positive numbers in an array, using a for loop and zero checks, and store results in a two element array.
Learn to reverse elements in an array with a Java program using a loop that moves from the start to the end and prints the reversed sequence.
Identify mini peaks by checking each array element against its left and right neighbors, ensuring it is greater than both, and print those elements.
Create a Java program to find the min and max in an array by initializing them and using a for loop. The example shows max 125 and min 3.
Print the last m elements of an array in Java using a scanner. Start at length minus m and loop to display, validating m against length.
Create a Java program that builds a two-dimensional matrix from user input, fills it with nested loops, and prints it in matrix form.
Learn to add two matrices by taking user input, defining matrices a and b with matching dimensions, computing their sum, and printing the result.
Develop a Java program to print diagonal elements of a matrix using nested loops and the i == j condition. See examples with 3x3 and 4x4 matrices.
Determine whether a matrix is sparse by counting zero elements and comparing the count to half the total elements, and implement this in Java with user input and loops.
Swap two user-specified rows in a matrix using a temp variable and a single loop, then display the swapped 3x3 matrix.
Learn to compute the matrix transpose by swapping rows and columns, for both square and non-square matrices. Implement the logic in Java using a transposed matrix and display the results.
Check if a given square matrix is symmetric by computing the transpose and comparing it to the original; a boolean flag signals symmetry and prints symmetric or asymmetric.
This lecture demonstrates a Java program that swaps two matrix columns in a 3x3 matrix using a temp variable, row-by-row swaps, and prints the matrix after swap.
Learn to print a right triangle (half pyramid) of numbers in Java using two nested for loops and scanner input, producing spaced rows.
Discover two variations of the half pyramid right triangle pattern in Java: print the same number per line using i, and print in reverse order by decrementing.
Print an inverted right triangle in Java using a nested loop: outer loop starts at n and decrements, inner loop prints 1 to i with spaces or a chosen symbol.
Explore how to print a mirrored right triangle in Java using nested for loops, spaces, and conditional printing to produce a right-aligned number pattern.
Learn to print an inverted mirrored right triangle in Java by modifying the inner loop to print increasing spaces first and then numbers, achieving the mirrored pattern two.
Implement a Java program that prints Pascal's triangle using two halves of nested loops, incrementing from one to a maximum n and then decreasing back to one with stars.
Print a reverse left Pascal's triangle in Java using nested for loops to print spaces and stars, highlighting the mirrored pattern and dynamic row printing.
Develop a sand glass pattern printer in Java by using nested for loops to print spaces and special characters, creating a first half and a reverse second half.
Discover what an algorithm is, its stepwise inputs and outputs, and how language-independent representations (including linear search) translate into programmatic implementations across languages, with multiple algorithms.
Explore time complexity and big O notation to choose the fastest algorithm, comparing worst, best, and average cases while analyzing inputs like linear search in arrays.
For beginners, learn how constant time complexity (O(1)) remains unaffected by input, yielding the fastest algorithms, illustrated by array index access.
Explore logarithmic time complexity where runtime scales with the log of input size using divide and conquer. See how binary search on a sorted array locates elements efficiently in Java.
Explore linear time complexity, where runtime grows directly with input size, expressed as o of n, and learn how linear search uses a for loop to find min or max.
Explore quadratic time complexity, where runtime grows with the square of input size, illustrated by nested loops and bubble sort that sorts an array using adjacent swaps.
Exponential time complexity doubles with input size, appearing in brute force algorithms that explore permutations and combinations; these methods don't scale well and are used in cryptography to test passwords.
Implement bubble sort by making passes, comparing adjacent elements, and swapping when the first is greater, pushing the largest values toward the end with quadratic time.
Implement bubble sort in Java by creating a sort method that swaps adjacent elements when out of order, then apply it to an int array and print the sorted result.
Enhance the bubble sort by stopping the inner loop early as the outer loop progresses, so the sorted portion grows, with the next lecture implementing this optimization.
Implement the enhancement by changing the inner for loop condition from numbers.length minus one to numbers.length minus i, maintaining the same sorted output while improving performance.
Enhance bubble sort by stopping early when no swaps occur, replacing the outer for loop with a while loop that ends as soon as the inner loop has no swaps.
We implement an enhanced bubble sort that stops when no swaps occur, using a swapped flag and a while loop to replace the outer loop.
Implement a selection sort from scratch in Java by using an inner loop to find the minimum element and swap it into place, producing a sorted array.
Demonstrates insertion sort by progressively inserting each element into the sorted left side, using two loops and swaps when left elements are greater, yielding O(n^2) time.
Implement insertion sort in java by creating a sorting.insertion class with a public static insertionSort method that swaps adjacent elements using a temp variable, then print the sorted array.
Explore how linear search traverses an array element by element to locate a target, returning true when found and false otherwise, with worst-case O(n) and best-case O(1).
Learn to implement a linear search in Java by building a simple program that searches an int array for a target, returns the index or -1, and prints results.
Master binary search on a sorted array by selecting the middle index and narrowing to the left or right halves; compare targets and implement iteratively or recursively.
Learn how to implement binary search on a sorted array, including setting low and high, computing mid, comparing with the target, and returning the found index or minus one.
Implement a recursive binary search on an array by adapting the nonrecursive version, using mid, low, high, and a base case to return index or -1, then test in main.
Explore how data structures store, organize, and access data in memory to solve problems. Understand arrays, linked lists, stacks, and queues as choices for different scenarios.
Explore linear and non-linear data structures in Java, distinguishing static and dynamic types, including arrays, linked lists, stacks, and queues, then trees and graphs.
All source code is available for download
Responsive Instructor - All questions answered within 24 hours
Professional video and audio recordings (check the free previews)
Are you a College Student with Core Java background who is interested in improving your programming skills or overcome the fear of coding , this course is for you.This course is also for those students who have completed my Core Java Made Easy Course.
You will start working on simple programs and move using numeric types
Print Digits in a number
Sum of Digits in a number
Check if a number is palindrome or not
Convert integer to binary and visa versa
Check if a given number is Special and Perfect Number
and More
Work with Strings:
Reverse a String in different ways
Count the words in given text
Find words,Remove Vowels
Find Duplicates,Replace Next Character
and More
Understand Recursion and write programs using it
Write programs using Arrays and Matrices
Sum of positive and negative numbers in a array
Find min and max element in a array
Reverse elements in a array
Check if a given matrix is a sparse matrix
Do Matrix Transpose
Swap Rows and Columns
Work with patterns:
Print Right Triangle
Print Inverted Right Triangle
Mirrored Right Triangle
Understand Time and Space Complexity
Implement Bubble Sort and enhance it
Implement Selection Sort
Implement Linear Search
Implement Binary Search using recursive and non recursive ways
Data Structures:
What are Data Structures
Different Types of Data Structures
Linked Lists:
Create a LinkedList
Insert at the end
Insert at the beginning
Insert in the middle
Delete at different positions
Traverse
Find Nth Node
Check if list has a loop
Reverse a List
Work with Double LinkedList
Stacks:
Create a stack using an array
Create a stack using a List
Push,Pop,Peek
Reverse a String using a stack
Check if symbols are balanced
Queues:
Create a Queue using an Array
Create a Queue using a List
enQueue, deQueue
Trees:
Create a Tree
Perform PreOrder,InOrder,PostOrder traversals
max, search, find and findMin