Monday, July 7, 2025
What is Object in Java and Object Oriented Programming? Example Tutorial
Open Closed Design Principle in Java - Benefits and Example
How to use Class in Java Programming - Example
What is Inheritance in Java and OOP Tutorial - Example
What is polymorphism in Java? Method overloading or overriding?
Can we declare a class Static in Java? Top Level and Nested static class Example
Law of Demeter in Java - Principle of least Knowledge - Real life Example
What is interface in Java with Example - Tutorial
Interface in java is a core part of the Java programming language and one of the ways to achieve abstraction in Java along with the abstract class. Even though the interface is a fundamental object-oriented concept; Many Java programmers think of Interface in Java as an advanced concept and refrain from using the interface from early in a programming career. At a very basic level interface in java is a keyword but same time it is an object-oriented term to define contracts and abstraction, This contract is followed by any implementation of Interface in Java. Since multiple inheritances are not allowed in Java, the interface is the only way to implement multiple inheritances at the Type level.
Saturday, July 5, 2025
Top 10 Courses to Crack System Design Interview in 2025 - Best of Lot
4 Steps to Prepare for System Design Interviews in 2025? [The Ultimate Guide]
How to System Design Trade Position Aggregator? [Solution]
Friday, July 4, 2025
Review - Is ByteByteGo System Design Interview Course by Alex Xu Really Worth it in 2025?
Thursday, July 3, 2025
How to Remove Duplicates from Array without Using Java Collection API? Example
How to find smallest number from int array in Java, Python, JavaScript and Golang? [Solved]
How to Find Multiple Missing Integers in Given Array of Numbers with Duplicates in Java?
Difference between a List and Array in Java? ArrayList vs Array Example
How to Find all Pairs in Array of Integers Whose sum is Equal to a Given Number in Java? Solution Example
How to Create and Initialize Anonymous Array in Java? Example
Can You Make an Array or ArrayList Volatile in Java?
Difference between Linked List and Array in Java? Example
How to merge two sorted arrays in Java? Example Tutorial
How to check if a given linked list is a palindrome in Java? Example [Solved]
[Solved] How to reverse a Stack in Java using Recursion and Iteration? Example Tutorial
[Solved] How to Implement Fibonacci Series with Memoization in Java 8? ConcurrentHashMap Caching Example
Top 20 Stack and Queue Data Structure Interview Questions for 1 to 3 years Experienced
Top 25 Recursion Interview Questions Answers for Coding Interviews
Top 10 Matrix Coding Exercises for Programming interviews and Homework
How to find first recurring or duplicate character in given String? [Solved]
Tuesday, July 1, 2025
[Solved] How to Find maximum Product of a sub-array in Java? Example
Hello guys, if you are asked to find maximum product of a sub-array in Java and you are wondering how to solve this difficult looking coding problem then you have come to the right place. Earlier, I have shared 30 array coding problems, 30 linked list problems, and 10 dynamic programming problems and in this article, we shall be finding the maximum product of a sub-array in java. This problem has a lot to do with arrays. But first, we'll solve the problem then we talk about Array and how it operates. The problem we are to solve here is to find the maximum product of a subarray in Java.
How to calculate Area and Perimeter of Square in Java Program? Example Tutorial
Hello guys, if you are looking for Java program to calculate area of Square or program to calculate perimeter of square or just learning Java and looking for programming exercises then you have come to the right place. I have share many programming exercises and homework in this blog and today, I am going to share another simple programming assignment for beginners. Yes, we ae going to write a program which will calculate the area and perimeter of a square in Java. If you don't remember, area of a square is nothing but the multiplication of side with itself or square of side, while perimeter of a square is 4 times of its side because in case of square, each side is equal.
How to Print a left triangle star pattern in Java? Example Tutorial
[Solved] How to check if given point is inside Triangle or not in Java? Example
How to Rotate Array to Left or Right in Java? Example - LeetCode Solution
How to check Perfect number in Java? Example Tutorial
How to transpose a Matrix in Java? Example Tutorial
Top 10 Dynamic Programming Problems from Coding Interviews
How to check if a given Tree is a Binary Search Tree in Java? Example Tutorial
Radix sort in Java with Example
How to check if a String has all unique characters in Java? [Solved]
5 ways to find length of String in Java - Example Tutorial
How to implement Linear Search in Java? Example Tutorial
How to Find Square Root of a Number in Java? Example Solution
Counting Sort Algorithm in Java? Example Tutorial
3 Ways to Find Duplicate Elements in an Array - Java
Monday, June 30, 2025
How to sort an Array in Java? Ascending and Descending Order Example
How to loop through an Array in Java? Example Tutorial
How to declare and initialize a List with values in Java (ArrayList/LinkedList) - Arrays.asList() Example
How to implement Skip List in Java? Example Tutorial
Hello friends, we meet again today. hope you all are excited and ready for today's journey. Today, we are gonna learn something that is not very common. It is used not very common, but, if used, it is a great strength to our time complexity reduction. So, what's the wait? Let's start! So, suppose we have a linked list with us which has 10 million records. Now, for searching a particular node, the time taken would be O(N). Where N is the size of the list. Similarly, the time taken for deletion of a Node, Insertion at a particular Node will also take O(N) time. Can we reduce it?
How to find If Linked List Contains Loop or Cycle in Java? Example Solution
How to use Array in Java? Example Tutorial
Top 15 Data Structures and Algorithm Interview Questions Answers for Java Programmer
Difference between Stable and Unstable Sorting Algorithm - MergeSort vs QuickSort
Saturday, June 28, 2025
How to Count Number of Leaf Nodes in a Binary Tree in Java ? [ Iterative and Recursive Solution]
6 ways to declare and initialize a two-dimensional (2D) String and Integer Array in Java - Example Tutorial
How to implement Bucket Sort in Java? [Solved] - Example Tutorial
Recursive Binary Search Algorithm in Java - Example Tutorial
Difference between Stack and Queue Data Structure in Java? Example
Difference between Comparison (QuickSort) and Non-Comparison (Counting Sort) based Sorting Algorithms? Example
How to implement Post Order Traversal of Binary Tree in Java - Recursion and Iteration Example
How to Implement Binary Search Tree in Java? Example
Friday, June 27, 2025
How to Compare Arrays in Java – Equals vs deepEquals Example
Recursion in Java with Example – Programming Tutorial for Beginners
3 Examples to Print Array Elements/Values in Java - toString and deepToString from Arrays
Iterative QuickSort Example in Java - without Recursion
4 Ways to Search Java Array to Find an Element or Object - Tutorial Example
How to loop over two dimensional array in Java? Example
2 Examples to Convert Byte[] Array to String in Java
How to Fix Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: in Java? Solution
Thursday, June 26, 2025
How to remove all special characters from String in Java? Example Tutorial
StringTokenizer Example in Java with Multiple Delimiters - Example Tutorial
How to replace a substring in Java? String replace() method Example Tutorial
How to check if String contains another SubString in Java? contains() and indexOf() example
How to check if a String is numeric in Java? Use isNumeric() or isNumber() Example
How to split String in Java by WhiteSpace or tabs? Example Tutorial
Java String Replace Example Tutorial
How SubString method works in Java - Memory Leak Fixed in JDK 1.7
How to use String in switch case in Java with Example
How to String Split Example in Java - Tutorial
I don't know how many times I needed to Split a String in Java. Splitting a delimited String is a very common operation given various data sources e.g CSV file which contains input string in the form of large String separated by the comma. Splitting is necessary and Java API has great support for it. Java provides two convenience methods to split strings first within the java.lang.String class itself: split (regex) and other in java.util.StringTokenizer. Both are capable of splitting the string by any delimiter provided to them. Since String is final in Java every split-ed String is a new String in Java.
How to convert String or char to ASCII values in Java - Example Tutorial
int asciiOfA = (int) 'A';
Here casting is not necessary, simply assigning a character to an integer is enough to store the ASCII value of character into an int variable, but casting improves readability.
byte asciiOfB = 'B'; // assign 66 to variable