2024

Decision Making

Decision Making Statements Decision-making statements are one of the control flow statements which decide which statement to execute and when. It evaluate the boolean condition and control the execution of the block still the boolean condition provided is true.There are two types of decision-making statements in Java 1) if statement2) switch statement 1) if Statement: […]

Decision Making Read More »

Loops

Loops in JavaLoop in programming concept is block of code which provides a set of instruction that keeps executing until a specific condition is met and becomes true/false to stop its execution,whether execution needs to be stopped on true or false depends on the condition that is implemented to stop its execution. In Java there

Loops Read More »

Sort String

Sort String Programmatically in Java Program 1 : Java Program to sort a string without using inbuilt sort() method Program 2 : Java Program to sort a string without using sort() method Program 3 : Java Program to sort a string without using Arrays.sort(T [ ], Comparator c) method

Sort String Read More »

Palindrome

Palindrome String A string is said to be palindrome if it is the same from both the ends. For example : malayalam,rotor,civic,etc Program 1 : Check Whether String is Palindrome (Using Reverse String) Program 2 : Check Whether String is Palindrome (Using Two Pointer) Program 3 : Check Whether String is Palindrome (Using Recursion) Program

Palindrome Read More »

Anagram String

Anagram String What is Anagram String ? Two strings are said to be anagram if they contain the same characters even though order of characters may be different. For example read and dare,eat and tea,fear and fare and so on Program 1 : Java Program To Check Whether Two Strings Are Two Strings Are Anagram

Anagram String Read More »

Reverse String

Reversing A String Programmatically Program 1 : Program to Reverse a String (Method – 1 Using for loop) Program 2 : Program to Reverse a String (Method – 2 Using String.getBytes() Method) Program 3 : Program to Reverse a String (Method – 3 Using StringBuilder.reverse() Method) Program 4 : Program to Reverse a String (Method

Reverse String Read More »

Insert String

Inserting New String Into Existing String Program 1 : Java Program to insert String into another String (Method 1) Program 2 : Java Program to insert String into another String (Method 2 : Using String.substring()) Program 3 : Java Program to insert String into another String (Method 3 : Using StringBuffer.insert())

Insert String Read More »

Heap Sort

Heap Sort in Java Heap sort is a comparison-based sorting technique which is based on Binary Heap Data Structure. Heap Sort is an optimization of selection sort where we first find the max (or min) element swapping it with the last (or first). and we repeat the same process for the remaining elements. In Heap

Heap Sort Read More »

Scroll to Top