Bubblesort

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • NoviceJava
    New Member
    • Mar 2008
    • 14

    #16
    Originally posted by JosAH
    You have to import that class, just like every class not in the package java.lang.
    This is how you do that: before you define any class add the line:

    [code=java]
    java.util.Array s;
    [/code]

    How did I know what package this Arrrays class is in? By reading the API docs.

    kind regards,

    Jos
    Thanks.

    I did read it but I never found the part about converting to a String.

    Comment

    • JosAH
      Recognized Expert MVP
      • Mar 2007
      • 11453

      #17
      Originally posted by NoviceJava
      Thanks.

      I did read it but I never found the part about converting to a String.
      But in reply #13 you wrote:

      Originally posted by you
      I tried this:

      System.out.prin tln(Arrays.toSt ring(sorting(mk rand) ))

      but I got the error message saying that it cannot find symbol
      symbol: variable Arrays
      That simply indicates that the compiler couldn't find the 'Arrays' symbol, i.e. it
      couldn't check whether or not there even *was* a method named toString(). That
      should've fired up your attention: when a class symbol can't be found you either
      misspelt its name or you have forgotten to import it.

      kind regards,

      Jos

      Comment

      Working...