Search:

Type: Posts; User: KevinWorkman

Search: Search took 0.10 seconds.

  1. Replies
    24
    Views
    1,933

    [SOLVED] Re: I'm a java beginnier

    Maybe you should write a function that takes two parameters- a String, and an int. The function returns the String value of the character at that position. You already do that.

    When you have that...
  2. Replies
    24
    Views
    1,933

    [SOLVED] Re: I'm a java beginnier

    Okay, and what does that output?

    Take a look at the String API: String (Java Platform SE 6)

    Pay special attention to the different substring() methods. See the one that takes two arguments, a...
  3. Replies
    24
    Views
    1,933

    [SOLVED] Re: I'm a java beginnier

    You already have the syntax though. You already use the substring() method. I don't understand what you're stuck on. Make an attempt and post what you have instead of giving up and crossposting.
  4. Replies
    24
    Views
    1,933

    [SOLVED] Re: I'm a java beginnier

    Nevermind, I guess I'm wasting my time here.

    http://www.java-forums.org/new-java/49066-dont-know-how-use-lastindexof.html
  5. Replies
    24
    Views
    1,933

    [SOLVED] Re: I'm a java beginnier

    You already use the subString() method. That's one way to get the character at a certain location. Have you tried that?
  6. Replies
    24
    Views
    1,933

    [SOLVED] Re: I'm a java beginnier

    You aren't incorrectly using int, you're just not taking the next step. You have the position of the character you want. Now you need a method that gets that character. Hint: You're already using one...
  7. Replies
    24
    Views
    1,933

    [SOLVED] Re: I'm a java beginnier

    Why are you using the indexOf() method? More accurately, why are you simply printing out the value returned from it? That gives you the position of the space, but that's not what you want to print...
  8. Replies
    24
    Views
    1,933

    [SOLVED] Re: I'm a java beginnier

    The API is your best friend: String (Java Platform SE 6)
    Java Platform SE 6
  9. Replies
    24
    Views
    1,933

    [SOLVED] Re: I'm a java beginnier

    There are quite a few ways to do this. You could split on spaces or iterate over each char, testing whether each is an initial (what that means is up to you). Check out the API for useful methods.
  10. Replies
    24
    Views
    1,933

    [SOLVED] Re: I'm a java beginnier

    What have you tried? Where are you stuck?
Results 1 to 10 of 10