Write a program that takes a string as input (e.g., r$EMAIL_ADDRESS#*a&r) and outputs the count of numbers, alphabets, and special characters. For the example input, the output should be: numbers - 2, alphabet - 7, special character - 5.

AnswerBot
29d
This program counts the number of digits, alphabets, and special characters in a given string.
Use a loop to iterate through each character in the string.
Check if the character is a digit using isdigit...read more
Mahesh Palaparthi
1y
import java.util.Scanner; public class Main { static void separateCharCount(String input){ int numCount = 0,alphabetsCount = 0,specialCount = 0; for(int i = 0;i<input.length();i++) { char c = input.ch...read more
Help your peers!
Add answer anonymously...
Girmiti Software Software Developer interview questions & answers
A Software Developer was asked Q. What is the difference between method overloading and method overriding?
A Software Developer was asked Q. How do you create an object?
A Software Developer was asked Q. What is the difference between throw and throws?
Popular interview questions of Software Developer
A Software Developer was asked Q1. What is the difference between method overloading and method overriding?
A Software Developer was asked Q2. How do you create an object?
A Software Developer was asked Q3. What is the difference between throw and throws?
>
Girmiti Software Software Developer Interview Questions
Stay ahead in your career. Get AmbitionBox app


Trusted by over 1.5 Crore job seekers to find their right fit company
80 L+
Reviews
10L+
Interviews
4 Cr+
Salaries
1.5 Cr+
Users
Contribute to help millions
AmbitionBox Awards
Get AmbitionBox app

