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!
Select
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
play-icon
play-icon
qr-code
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

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2025 Info Edge (India) Ltd.

Follow Us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter
Profile Image
Hello, Guest
AmbitionBox Employee Choice Awards 2025
Winners announced!
awards-icon
Contribute to help millions!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos
Add office benefits
Add office benefits