Results 1 to 6 of 6

Thread: StringBuilder

  1. #1
    Dayanand is offline Member
    Join Date
    Feb 2011
    Posts
    61
    Rep Power
    0

    Default StringBuilder

    package stringBuilder;
    import java.lang.String;

    public class My
    {
    public static void main(String[] args)
    {
    StringBuilder sb = new StringBuilder();
    sb.append("abc");
    }
    }

    StringBuilder class is not regognised in my eclipse
    i am using helios eclipse,i hope it is the latest one

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    3,939
    Rep Power
    8

    Default

    The version of Eclipse, or indeed whether you use an IDE or not, is irrelevent here.

    What is the actual error you're getting?

    Are you sure the error is not actually caused by your use of the stringBuilder package? Do you have your files set up correctly?
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,949
    Rep Power
    19

    Default

    And why import java.lang.String ??

  4. #4
    Dayanand is offline Member
    Join Date
    Feb 2011
    Posts
    61
    Rep Power
    0

    Default

    i have set up all the files correctly,then how does the error occured

  5. #5
    Dayanand is offline Member
    Join Date
    Feb 2011
    Posts
    61
    Rep Power
    0

    Default

    hello sir i want to know the below doubts

    package basics;

    public class Mgr
    {

    public static void main(String[] args)
    {
    int all[] = new int [10];
    System.out.println(all);
    System.out.println(all[1]);
    }
    }
    output
    [I@1242719c
    0

    Hi
    i want to know the memory addresses of each element in the array
    here i am printing System.out.println(all);

    if all is starting element`s memory address of the array all[].?
    then how to know the remaining elements memory addresses which are in the array all[]

    more ever the address [I@1242719c its keep on changing when ever i compile for the next time to [I@1242719c1,,,,i want to know the reason why it happens so

    Thanks in advance
    Daya

  6. #6
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,949
    Rep Power
    19

    Default

    Is your original problem solved?
    If so you might want to say what the problem was and mark the thread as solved, then open a new one with your new problem.

Similar Threads

  1. StringBuilder
    By tmotse in forum New To Java
    Replies: 3
    Last Post: 09-13-2010, 08:07 AM

Posting Permissions

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