Java program to check whether two strings are anagram or not?7 Jan 2025 | 1 min read Two strings are called anagrams if they contain same set of characters but in different order. "keep ? peek", "Mother In Law - Hitler Woman". File: AnagramString .java Output: Keep and Peek are anagrams MotherInLaw and HitlerWoman are anagrams |
Java Program Number to Word In this section, we will create a Java program that converts the given number into words. For example, if the given number is 54,297 then the output should be Fifty-Four Thousand Two Hundred Ninety-Seven. Let's create a Java program for the same. NumberToWordExample1.java class...
9 min read
Seven segments display is an output display device. It provides a way to display information in the form of images, text, or decimal numbers. It is an alternative to complex dot matrix displays. Seven segment displays are widely used in digital or electronic devices like calculators,...
8 min read
In this section, we will discuss what is the neon numbers and also create a Java program to check if the given number is neon or not. Also, we will find all the neon numbers between a specified range. Neon Number A positive integer whose sum of digits...
3 min read
Java Convert double to int We can convert double to int in java using typecasting. To convert double data type into int, we need to perform typecasting. Typecasting in java is performed through typecast operator (datatype). Here, we are going to learn how to convert double primitive type into...
1 min read
Binary search is used to search a key element from multiple elements. Binary search is faster than linear search. In case of binary search, array elements must be in ascending order. If you have unsorted array, you can sort the array using Arrays.sort(arr) method. Binary Search Algorithm...
8 min read
Java Convert long to int We can convert long to int in java using typecasting. To convert higher data type into lower, we need to perform typecasting. Typecasting in java is performed through typecast operator (datatype). Here, we are going to learn how to convert long primitive type into...
1 min read
Java Program to Print Spiral Pattern The spiral pattern (or matrix in spiral form) is frequently asked in Java interviews and academics. In this section, we will create a Java program to create a spiral pattern or spiral matrix. What is Spiral Matrix or Spiral Pattern? A spiral...
7 min read
In this section, we will learn what is a smith number and also create Java programs to check if the given number is smith or not. The smith number program frequently asked in Java coding tests and academics. Smith Number A Smith number is a composite number whose...
4 min read
Java Convert String to char We can convert String to char in java using charAt() method of String class. The charAt() method returns a single character only. To get all characters, you can use loop. Signature The charAt() method returns a single character of specified index. The signature of charAt()...
2 min read
In this section, we will learn how to create a Java program to find the largest of three numbers. Along with this, we will also learn to find the largest of three numbers in Java using the ternary operator. Using Ternary Operator Before moving to the program,...
3 min read
We request you to subscribe our newsletter for upcoming updates.
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India