Ask Experts Questions for FREE Help !
Ask
    h007's Avatar
    h007 Posts: 2, Reputation: 1
    New Member
     
    #1

    May 9, 2016, 04:37 AM
    Java program compute number of times a character appears HELP
    Design a program to compute the number of times the character e occurs in a string s. The program should not distinguish between lower and upper case characters.
    For example if the user entered the following input:

    char e = ‘t’
    String s = “aCT5De HTEetbN1”

    Then the output would be 3.
    In your answer clearly detail the design of the program as well as creating the code for the solution.
    CravenMorhead's Avatar
    CravenMorhead Posts: 4,532, Reputation: 1065
    Adult Sexuality Expert
     
    #2

    May 9, 2016, 06:41 AM
    While I could bang this out in about 5 minutes and probably 20 lines of documented code, I am not going to do your homework for you. You need to learn how to do simple loops.

    What do you have already? I can help you with road blocks from there on in.

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Eight less than 3 times a number is 6 times the number increased by 10 [ 3 Answers ]

Eight less than 3 times a number is 6 times the number increased by 10

Java netbeans program- Connection between java and mysql,How to conn [ 0 Answers ]

which I wrote from a book but when I run it, it shows exception please give me the code to connect jlistbox to database when I click on btn1. btn coding should search "name" in database and shows all the names in listbox my coding: here-- r1,r2,r3 are radio btns and l1,l2,l3 are labels,...

If I rolled a dice 1000 times, how many times can I expect to roll an odd number? [ 1 Answers ]

If I rolled a dice 1000 times, how many times can I expect to roll an odd number?

Write a java program that reads an integer n from the key board and compute the value [ 3 Answers ]

Write a java program that reads an integer n from the key board and compute the value of 2^n and output it to the screen

Why does my computer systems appears dead at times or it locks up shortly after start [ 1 Answers ]

Why does my computer systems appears dead at times or it locks up shortly after starting but always before the Operating System completes loading


View more questions Search