Search:

Type: Posts; User: SamJava_the_Hut

Search: Search took 0.22 seconds.

  1. Re: I wanted to output the string itself, but the output looks like it's been encrypted or something

    The overall goal of this entire program is to overwrite the old badStr with the goodStr, regardless of what length the strings are. The overwritten badStr is the fixed version that of the badStr, and...
  2. Re: I wanted to output the string itself, but the output looks like it's been encrypted or something

    Norm, I am getting way closer! The IndexOutOfBoundsException problem is gone. Below is my updated code:

    FixString.java


    package samsExperiments;
    import java.util.Scanner;
    import...
  3. Re: I wanted to output the string itself, but the output looks like it's been encrypted or something

    I'm now trying to fix my bad string with array lists instead of regular arrays. If I use regular arrays, the program crashes with an array out of bounds error if the badStr and goodStr strings are...
  4. Re: I wanted to output the string itself, but the output looks like it's been encrypted or something

    It works! Thanks Norm:


    public static String fixBadStr(char[] badStrToChars, char[] goodStrToChars) {
    for(int i = 0; i < badStrToChars.length; i++) {
    if(badStrToChars[i] !=...
  5. I wanted to output the string itself, but the output looks like it's been encrypted or something

    Hi, I'm trying to fix a string from "hollo werld" to "hello world". To do this, I made another string of what we want, turned both of them into char arrays, and iterated through, changing elements as...
Results 1 to 5 of 5