A non-palindrome word can be made a palindrome word just by adding the reverse of the word with the original word.Here's a Java program that accepts a non-palindrome word and displays the new word after making it a palindrome by adding the reverse of the word to the original word. Read more
|
Write a program to input a string and display the frequency of vowels of each word present in the string.Here’s a Java program that takes a string input and displays the frequency of vowels for each word present in that string: Read more
Number of vowels present in TECHNOLOGY = 3 |
A string is said to be ‘Unique’ if none of the alphabets present in the string are repeated.Here's a Java program that accepts a string and checks whether it is "Unique," meaning none of the characters in the string are repeated: Read more
|
Accept a word and display the new word after removing all the repeated alphabets.This Java program removes all repeated alphabets from a given word while preserving the order of their first occurrences. Read more
|
Accept a word and convert it into lowercase, if it is in upper case.This Java program accepts a word, converts it to lowercase if it's in uppercase, and replaces each vowel with the next character in the alphabet, displaying the modified word as output. Read more
|
A computer typist has the habit of deleting the middle name ‘Kumar’ while entering the names containing three words.This Java program accepts a three-word name from the user and removes the middle name "Kumar," displaying the resulting name without it. Read more
|
Write a program to accept a sample string and replace the word Blue with Red.This Java program demonstrates how to manipulate strings by replacing all occurrences of a specified word in a given text. In this case, the word "Blue" is replaced with "Red", and the updated string is displayed as the output. Read more
|
Write a program to input a string and print the word containing the maximum vowels.This program takes a string input from the user and determines which word contains the maximum number of vowels. It splits the string into individual words and counts the vowels in each word. The word with the highest vowel count is then displayed as the output. Read more
|
Write a program to input a string and print the character that occurs the maximum number of times within a string.This Java program counts the occurrences of each character in a given string and identifies the character that appears the most frequently, excluding spaces. Read more
|
Write a program to replace all the zeros (0) with ‘O’ and display the new String as:This Java program takes a predefined string with the digit 0 and replaces it with the letter O, displaying the corrected string. Read more
|
Enter a String and Display all the palindrome words present in the String.This Java program accepts a sentence and displays each word that is a palindrome, i.e., reads the same forward and backward. Read more
|
Enter a String and Frame a word by joining all the first characters of each word. Display the new word.This Java program accepts a sentence, extracts the first character of each word, and joins them together to form and display a new word. Read more
|
Write a program in Java to accept a String in upper case and replace all the vowels with the Asterisk (*) present in the String.This Java program accepts an uppercase string and replaces all vowels (A, E, I, O, U) with an asterisk (*). Read more
|
Write a program in Java to accept a word and display the ASCII of each character.This Java program accepts a word and prints the ASCII value of each character within it, displaying each character’s ASCII code in a formatted manner. Read more
Read Answer
ASCII of U = 84 ASCII of E = 69 ASCII of J = 73 |
Convert all characters of the words in lowercaseThis Java program accepts an uppercase sentence and converts it to title case, keeping only the first letter of each word in uppercase and the rest in lowercase, for a neatly formatted output. Read more
|
Write a program in Java to accept a String in upper case and find the frequency of each vowel present in the String.This Java program accepts an uppercase string and calculates the frequency of each vowel (A, E, I, O, U) in the string, then displays the results in a clear format. Read moreWrite
a program in Java to accept a String in upper case and find the frequency of
each vowel present in the String. Sample
Input: “RAIN WATER
HARVESTING ORGANISED BY JUSCO” Sample
Output: Frequency of ‘A’ = 4 Frequency of
‘E’ = 3 Frequency of
‘I’ = 3 Frequency of
‘O’ = 2
Frequency of
‘U’ = 1 |
Write a program in Java to enter a String/Sentence and display the longest word and the length of the longest word present in the String.This Java program accepts a string or sentence from the user and identifies the longest word within it, displaying both the word and its length. Read more
Sample Output: The longest word: FOOTBALL: The length of the word: 8 |
A man has written a statement as “My name is Alok Kumar Gupta and my age is 45 years”.This Java program corrects the name and age in a given statement and displays the updated version. Read more
Read Answer
|
Accept a sentence and find the frequency of a given alphabet.This Java program counts the frequency of a specified alphabet in a user-input sentence, taking into account case insensitivity. Read more
Sample Output: The frequency is ‘E’ is 3. |
Accept a name containing three words and display the surname first followed by the first and middle names.This program allows users to input a name with three words and displays the surname first, followed by the first and middle names, demonstrating basic string manipulation in Java. Read more
|