Search:

Type: Posts; User: Junky

Search: Search took 0.11 seconds.

  1. Replies
    20
    Views
    3,157

    [SOLVED] Re: Nested Loops & Processing Strings

    Declaring a variable and initialising it are two different things.

    Declare
    String s;

    Initialise
    s = "hello";

    Declare and initialise
    String s = "hello";
  2. Replies
    20
    Views
    3,157

    [SOLVED] Re: Nested Loops & Processing Strings

    Oops! Misread your post.


    char one = '1';
    char two = 't';
    System.out.println(Character.isDigit(one));
    System.out.println(Character.isDigit(two));

    Produces the exact output I expect: true...
  3. Replies
    20
    Views
    3,157

    [SOLVED] Re: Nested Loops & Processing Strings

    I can't do what?
  4. Replies
    20
    Views
    3,157

    [SOLVED] Re: Nested Loops & Processing Strings

    char currentChar = ...;

    No need to use objects when it isn't necessary.
  5. Replies
    20
    Views
    3,157

    [SOLVED] Re: Nested Loops & Processing Strings

    That error message is self explanatory, you did not give your variable an initial value.

    String s;
    if(5 == 19) {
    s = "hello";
    }
    System.out.println(s);

    In the above code what do you...
Results 1 to 5 of 5