Generate Random Number and String in Java

How to generate random number and String in java

In this post we will see different methods of generate random number and String in Java. Generate Random Number in java Logic 1- Using Random class package demopkg; import java.util.Random; public class GenRandomNumber { public …

Read more

3 Ways of Reverse a Number in Java

In this Post, we will learn different ways to reverse a number in java. This is frequently asked question in automation testing  interviews. Logic 1: Reverse a Number in java using while loop package demopkg; …

Read more

Functional Interface in Java 8

Functional Interface

In this tutorial, we will discuss about Functional Interface which is the feature in Java 8. What is Functional Interface? An interface that contains only one abstract method is called Functional Interface. SAM – This …

Read more

How To Sum digits in a String in Java

How to sum digits in a String in Java

In this post, we will learn How to separate out digits from a String and How to sum those digits. Algorithm: Take a String. Convert it into array of characters Apply for loop till length …

Read more

How To Reverse a String in Java

In this post, we will learn How to reverse a string in java using different methods. String is a sequence of characters which behave like an object in java. There are different ways to reverse …

Read more

Bubble Sort In java

Bubble Sort in Java

In this post, we will see how to do sorting ascending and descending using Bubble sort algorithm. What is Bubble sort in Java? Bubble sort is a sorting algorithm to sort the data in ascending …

Read more

Fibonacci Series in Java

fibonacci series in java

In this post we will learn fibonacci series in java, fibonacci series program in java using recursion and using all other methods. What is Fibonacci Series In Java? In Fibonacci series, the next number is …

Read more

Is-A Relationship in Java

Has -A Relationship In Java

In this post, we will learn what is Is-A relationship in Java Oops concept and also we will see Association and its types. Is-A used for code reusability in Java. An Is-A relationship is also …

Read more