it seems like you don't get it or you don't know it, i am talking about TWO
dimensional array of String, it doesn't matter i don't need to know this
anymore.

by the way i submitted the homework successfully, my program works correctly
you can check the javaprogramminghomework email if you are authorized, and
it doesn't require that i count the occurrence of a letter in a string. and
i don't jump pal.

On Sat, Jul 18, 2009 at 9:05 AM, miga <[email protected]> wrote:

>
>
>
> On Jul 17, 8:58 pm, Abbas Zaini <[email protected]> wrote:
>
> > in an other word how if i want to count the number of times the letter
> 'a'
> > occurred in the entries ( the two dimensional or even single dimensional
> > array of String).
> There are a number of ways to do this, but here is the simple one:
>
> String myString = "Michèle";
>        char myChar = 'è';
>        int myCount = 0;
>        for (int i = 0; i < myString.length(); i++) {
>            if (myString.charAt(i) == myChar) {
>                myCount++;
>            }
>        }
>        System.out.println(myCount);
>
> You may find benefit to study the String class before jumping into the
> homework.
> >
>

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/javaprogrammingwithpassion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to