Search:

Type: Posts; User: sunde887

Search: Search took 0.02 seconds.

  1. Replies
    38
    Views
    5,365

    Your welcome. This is the approach I took when...

    Your welcome.

    This is the approach I took when I started helping you


    public class Translator{
    public static String convert(String str){
    String result = "";
    String[] english = {...
  2. Replies
    38
    Views
    5,365

    The goal is to use something to break out or a...

    The goal is to use something to break out or a loop, know anything that does that? If you do, use it. Try changing it and then exiting the inner loop, you only need to test if its equal, you dont...
  3. Replies
    38
    Views
    5,365

    Here is the easiest way for me to explain the...

    Here is the easiest way for me to explain the flaw in your program.


    for(int j = 0; j < english.length; j++){
    if(s.equals(english[j]){
    System.out.print(l33t[j]);
    }
    else{
    ...
  4. Replies
    38
    Views
    5,365

    You have some unneccesary code for(int i =...

    You have some unneccesary code


    for(int i = 0; i < input.length(); i++){
    String s = input.substring(i , i + 1);


    //2ND...
  5. Replies
    38
    Views
    5,365

    Try switching from System.out.println() to...

    Try switching from System.out.println() to System.out.print(), then do it, post the answer, also, explain to me why you think its wrong if it is wrong, you seem pretty close.

    Also, it may be...
  6. Replies
    38
    Views
    5,365

    after buffered reader simply change from String...

    after buffered reader simply change from String input; to String input = "";

    Then try and compile it.
  7. Replies
    38
    Views
    5,365

    Did you compile it and run it to test? What...

    Did you compile it and run it to test? What happens? You can also make this create a string, then print the completed string.
    declare


    String str = "";

    Then append each item to this new...
  8. Replies
    38
    Views
    5,365

    You are close, however, you seem to have...

    You are close, however, you seem to have forgotten something, you tested for (s == english) and just print s, didn't you want to translate it?

    Also,when you are done I can post/message you the...
  9. Replies
    38
    Views
    5,365

    I don't mind helping, you have a lot of...

    I don't mind helping, you have a lot of unnecessary code. Try just storing the input as a string and then leaving it.

    when you get to the loop you don't want to manually split the string because...
  10. Replies
    38
    Views
    5,365

    If you want to use substring, the best way would...

    If you want to use substring, the best way would be a loop

    for example:


    String s = "Hello";
    for(int i = 0; i < s.length() - 1; i++){
    System.out.printn(s.substring(i, i + 1));
    }
  11. Replies
    38
    Views
    5,365

    The code is still a bit overcomplicated. Like...

    The code is still a bit overcomplicated.

    Like stated above, you only need 2 loops, this also makes it more efficient if you decide to add new letters to english[] and leet[].

    You can also use...
  12. Replies
    38
    Views
    5,365

    show me the code please.

    show me the code please.
  13. Replies
    38
    Views
    5,365

    It's extremely inefficient to create a loop for...

    It's extremely inefficient to create a loop for each item in the char array. Try using a nested loop.

    have the first loop loop through each item in the inputArray then for each item, have a second...
  14. Replies
    38
    Views
    5,365

    x is equal to the index of the array if x =...

    x is equal to the index of the array


    if x = 0
    arr[x] = arr[0]
    x = 1
    arr[x] = arr[1]
    x = n
    arr[x] = arr[n]
  15. Replies
    38
    Views
    5,365

    I like to edit my posts a lot, I apologize. With...

    I like to edit my posts a lot, I apologize. With the information I have added to my two posts prior to this you should easily be able to solve this, let me know if you figure it out, good luck!
  16. Replies
    38
    Views
    5,365

    I gave you some good spots to work from, I coded...

    I gave you some good spots to work from, I coded it and it works correctly, you will have to figure out changes necessary to complete it. Let me know when you implement what I suggested and what...
  17. Replies
    38
    Views
    5,365

    Is there a question here? also, use code tags...

    Is there a question here?

    also, use code tags please [ code ] and [ /code ] around your code without spaces.

    A better way would be to create a helper method which takes a 1 letter string and...
Results 1 to 17 of 17