User Profile

Collapse

Profile Sidebar

Collapse
Katie87
Katie87
Last Activity: Nov 10 '07, 09:57 PM
Joined: Oct 7 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Katie87
    replied to altering characters in a string
    in Java
    Ok and there's a bit more, if anyone can give me any ideas for it would be great.

    ok so i have my string x= "ABCEFGH"
    i need to first check if the length is a multiple of 6.
    if it is not, i need to add the # character to the end to make it a multiple of 6.
    then i need to take the first six, and do the replacements i mentionned above, and then add the number 0 in front of it, since i didn't have to add...
    See more | Go to post

    Leave a comment:


  • Katie87
    started a topic altering characters in a string
    in Java

    altering characters in a string

    Hi, i need to do some character replacements in a string.
    heres what i have to do, lets say i have the string x= ABCD
    i would have to change the character at index 0 to 1, then at 2 to 4, and so on.
    i tried to do x.replace(x.cha rAt(0), x.charAt(1)), but then what happened was if the characters in the string were the same, it replaced all of them by the character at one.
    does anyone know how i could do this so this doesn...
    See more | Go to post

  • Katie87
    replied to making a string out of integers
    in Java
    great thanks alot that was perfect...
    See more | Go to post

    Leave a comment:


  • Katie87
    started a topic making a string out of integers
    in Java

    making a string out of integers

    hey, i need to make an id. the first 3 numbers are 202, the second 2 are randomly generated, and the last one is an integer, which we get from somewhere else. the problem is the final value has to be stored in a long but i cant get the numbers together because the program just adds the integer values, instead of concatenating.
    does anyone know how i can do this.

    heres an example:

    int x= a random number(say 2)...
    See more | Go to post

  • Katie87
    replied to Switching between strings
    in Java
    I'm just beginning java, i havent learnt anything about string arguments yet, do you know how to do it with loops maybe?...
    See more | Go to post

    Leave a comment:


  • Katie87
    started a topic Switching between strings
    in Java

    Switching between strings

    Hey, i have to write a program in which we will apply the same code to 5 different strings. The thing is were not allowed to write the code more than once, and our output has to be given for each string. Does anyone know how to do this?
    See more | Go to post

  • Katie87
    replied to Stick Game
    in Java
    No just the same assignment i guess.
    See more | Go to post

    Leave a comment:


  • Katie87
    replied to Stick Game
    in Java
    No its actually the exact same thing as the other persons. no arrays allowed
    See more | Go to post

    Leave a comment:


  • Katie87
    started a topic Stick Game
    in Java

    Stick Game

    Hi, I am just starting to learn java and i need to make a game.

    So there are 2 players in the game. We have 5 rows of sticks arranged so that 1st row has 1 stick, the 2nd has 2 sticks, etc. players take turns and can remove as many sticks as they want, and from which ever row. goal is to remove the last stick.
    We need to alternate between both players, print out the game after each turn, and check if the player has won after...
    See more | Go to post
No activity results to display
Show More
Working...