How to Reverse a String in Java Word by Word17 Mar 2025 | 1 min read In this section, we reverse a string in Java word by word. Example 1: Reverse a string word by word using recursion Output: ![]() Example 2: Reverse a string word by word by using for loop Output: ![]() Next TopicJava Tutorial |
Program to print smallest and biggest possible palindrome word in a given string In this program, we need to find the smallest and biggest palindromic word present in the given string. Wow you own kayak In above example, wow represent the smallest palindrome and kayak represent the biggest...
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
In this program, we need to check whether two trees are identical or not. For two trees to be identical, they have to satisfy two conditions: Structure of both the trees should be the same. Nodes present in one tree should be present in another tree. Above diagram...
4 min read
In this program, we will create a singly linked list and delete a node from the beginning of the list. To accomplish this task, we need to make the head pointer pointing to the immediate of the initial node which will now become the...
6 min read
Trees are the non-linear data structure that stores data hierarchically. The tree is a collection of elements called nodes. Nodes are connected through edges and contain data. The first node of the tree is called Root. Each node may or may not have children node....
5 min read
In this section, we have created a number of Java program to check if a given number is perfect square or not. The perfect square or square number is a positive integer that is square of an integer. In other words, when we multiply two same numbers...
6 min read
Java Program to Count the Total Number of Punctuation Characters Exists in a String In the ious Java string programs, we have counted the number of words, white spaces, vowels, consonants, and characters. Sometimes it also becomes necessary to count the total number of punctuations in...
2 min read
In this program, we need to convert given binary tree to a corresponding binary search tree. A tree is said to be the binary tree if each of the nodes has at most two children. Whereas, the binary search tree is the special case of...
7 min read
Java Convert int to long We can convert int to long in java using assignment operator. There is nothing to do extra because lower type can be converted to higher type implicitly. It is also known as implicit type casting or type promotion. Java int to long Example Let's...
1 min read
In this program, we will find out the largest node in the given binary tree. We first define variable max that will hold root's data. Then, we traverse through the left sub-tree to find the largest node. Compare it with max and store the maximum...
5 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