Write a program in Java to accept a name (Containing three words) and display only the initials.This Java program takes a name consisting of three words and extracts the initials from each word, displaying them in a formatted manner. Read more
|
Write a program in Java to accept a word/string.This Java program takes a word or string input from the user and counts all the alphabets excluding vowels, providing the count as output. Read more
|
Accept a word/a String and display the new string after removing all the vowels present in it.Here’s a Java program that accepts a string and removes all the vowels from it, displaying the new string without vowels. Read more
|
Write a program to accept a character.This Java program checks the type of a given character, determining if it is a letter (and its case), a digit, or a special character. It provides clear feedback to the user based on their input. Read more
|
Write a program to input an alphabet in upper case or in lower case.This Java program prompts the user for an uppercase or lowercase letter and displays the next letter in the alphabet. It handles cases where the input is 'z' or 'Z', wrapping around to 'a' or 'A'. Read moreWrite
a program to input an alphabet in upper case or lower case. Display the next
alphabet accordingly. (i.e.: ‘a’ follows ‘b’, ……….. ‘z’ follows ‘a’). |
Accept two different characters and display the sum and difference of their ASCII value.This Java program accepts two different characters from the user and calculates their ASCII values. It then displays the sum and absolute difference of these values, providing a clear understanding of their numerical representation in the ASCII table. Read more
Sample Output: The sum of ASCII value = 165 |
Raj Kishore is an Assistant in the office.This Java program inserts the middle name "KUMAR" in an employee’s name with two words, ensuring it follows a three-word full name format for consistency. Read more
|
Convert all the first characters of the String in upper case and display the new String.This Java program capitalizes the first character of each word in a lowercase sentence. Useful for formatting strings, it provides step-by-step handling and displays the modified sentence. Read more
|
Enter a String. Print the String in alphabetical order of its alphabet.This Java program sorts the characters of an input string in alphabetical order using Arrays.sort() and displays the sorted string for easy learning and demonstration. Read more
|
Accept a word and check whether the word is Palindrome or not.This Java program checks if a word is a palindrome by comparing characters from both ends of the string, determining if it reads the same forwards and backwards. Read more
|
Write a program in Java to accept a word and display the same in Pig Latin.This Java program converts a given word into Pig Latin by locating the first vowel, moving preceding characters to the end, and appending "ay." The result follows the common Pig Latin format for easy learning. Read more
|
Write a program to change 26 to 15, January to August, Republic to Independence and finally print “ August 15 is celebrated as the Independence Day of India”.This Java program demonstrates how to modify specific words and numbers within a sentence, converting a Republic Day statement into an Independence Day message by replacing dates and terms. Read more
“January 26 is celebrated as the Republic Day of India” Write a program to change 26 to 15, January to August, Republic to Independence and finally print “ August 15 is celebrated as the Independence Day of India”. |
Accept a String and find the frequency of a word entered by the user in a String.This Java program accepts a sentence and a word from the user, then calculates the frequency of the specified word in the sentence, counting only exact standalone matches. Read more
Sample Output: 2 |
Accept a string (containing three words) and display the new string after reversing each character of the word.This Java program takes a string of exactly three words, reverses each word individually, and outputs the result. It demonstrates the use of basic string manipulation techniques using Java's StringBuilder and array handling methods. Read more
|
Accept a string (containing three words) and display the same in reverse order.This Java program accepts a user-inputted string containing exactly three words and outputs those words in reverse order, demonstrating basic string manipulation techniques. Read more
|
Accept a name (containing three words) and display the initials along with the surname.This Java program allows users to input a name consisting of three words, from which it extracts the initials of the first two words and combines them with the surname. It demonstrates basic string manipulation techniques in Java, making it an excellent exercise for beginners. Read more
Read Answer
|
Accept a string and display the number of upper case, number of lower case, number of special characters and number of digits present in the string.This Java program analyzes a user-inputted string to count and display the number of uppercase characters, lowercase characters, special characters, and digits present in it. It demonstrates basic string manipulation techniques and character classification using Java's built-in methods. Read more
Number of special characters = 1 Number of digits = 6 |
Write a program in Java to accept a string and find: a) Number of blank spaces in the string, b) Number of words in the string, c) Number of characters present in the stringHere’s a Java program that accepts a string and finds the number of blank spaces, the number of words, and the total number of characters in the string. Additionally, I've included meta tags and a short description. Read more
a) Number of blank spaces in the string |
Accept a string change the case of each character of the string and display the new stringHere’s a Java program that accepts a string, changes the case of each character, and displays the new string. Below the program, I’ve included relevant meta tags and a short description. Read more
|
Write a program to accept a String in lowercase and replace ‘e’ with ‘*’ in the given String.This Java program allows the user to input a lowercase string and replaces every instance of the letter 'e' with an asterisk ('*'). It effectively demonstrates basic string manipulation techniques in Java, providing a practical example for beginners. Read more
Read Answer
|