Java Program to Remove Duplicates From String

In this tutorial, We will learn writing the java program to remove the duplicate characters from the String. Take any string as an input from the user and check for duplicate characters and if there is any duplicity of characters then remove it. For example Java Program to Remove Duplicates From String Output Explanation Here, … Read more

Java Program to Concatenate two Strings

Concatenate Two Strings in java

In this tutorial, we are going to learn java program to concatenate two strings together. For two input strings that are given by the user, we need to join them together and return the final string as an output. For example Program 1: Concatenate two Strings using ā€˜+’ Operator in Java Output Explanations The user … Read more

Count Alphabets, Digits, Special Characters in String using Java

JAVA to count alphabets, digits, and special characters in string

In this tutorial, we are going to learn java program to count the number of alphabets, digits, and special characters present in an input string from the user. For any input string, we are going to print the number of alphabets (ā€˜a’-ā€˜z’ and ā€˜A’-ā€˜Z’), the number of digits(0-9), and the number of special characters present. … Read more

Java Program to Replace First Occurrence Vowel with ‘-‘ in a String

Replace First Occurrence Vowel With - In A String in java

In this tutorial, We will learn writing java program to Replace First vowel that occurs in the input string with ā€˜-ā€˜. For any input string, we have to find vowels which occurs very first in the string and print the character after replacing that vowels with ā€˜-ā€˜. For example Java Program to Replace First Occurrence … Read more

Java Program to Print Maximum Occurred Character in String

Print Maximum Occurred Character In String in java

In this tutorial, we will learn to print the character which occurs the most. For any input string, we have to check the number of occurrences of each character and print the character with the maximum number of occurrences. For example Java Program to Print Maximum Occurred Character in String Output Explanation In this output, … Read more

Java Program to Count Vowels and Consonants in the String

In this tutorial, we are going to learn java programming to count the number of vowels (ā€˜a’, ā€˜e’, ā€˜i’, ā€˜o’, ā€˜u’) and consonants (any alphabet other than vowels) in a string. For any input string, we have to count the number of vowels that appear and the number of consonants that appear. And returns the … Read more

Hi, Welcome back!
Forgot Password?
Don't have an account?  Register Now