Page 2 of 2 FirstFirst 12
Results 21 to 24 of 24
  1. #21
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,457
    Rep Power
    20

    Default

    Java Code:
    // TODO Auto-generated method stub
    Wonderful way to learn to code, not?

    @str4kt, I suggest you put off using an IDE with code generation features till you're familiar with the syntax and code structures of the language.

    If I were a teacher, which I'm not, I would set a bar for manual coding skills which the students would have to pass -- in a supervised test -- before being allowed to use any modern IDE. May sound primitive, but it pays off in the long run.

    db

  2. #22
    DevzAbhi's Avatar
    DevzAbhi is offline Member
    Join Date
    Jul 2008
    Posts
    67
    Rep Power
    0

    Default

    String str = "Jack";
    str = str.replace('k', '$');
    System.out.println(str);


    str = str.replace(str.substring(str.length()-1).toChar(), '$');


    replace this line

  3. #23
    DevzAbhi's Avatar
    DevzAbhi is offline Member
    Join Date
    Jul 2008
    Posts
    67
    Rep Power
    0

    Default

    this will replace last char always

  4. #24
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,457
    Rep Power
    20

Page 2 of 2 FirstFirst 12

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •