Search:

Type: Posts; User: red7

Search: Search took 0.43 seconds.

  1. Re: Java Class : How do I set up a toString method for arrays?

    Hmm. Using eclipse, and on the line with the x it just says : "length cannot be resolved or is not a field"
  2. Re: Java Class : How do I set up a toString method for arrays?

    "Exception in thread "main" java.lang.Error: Unresolved compilation problem:
    length cannot be resolved or is not a field

    at TestClass.concat(TestClass.java:41)
    at...
  3. Re: Java Class : How do I set up a toString method for arrays?

    Wont let me compile :

    public TestClass[] concat(TestClass...b1)
    {
    TestClass[] temp = new TestClass[b1.length+b.length]
    for(int i = 0;i<=temp.length;i++)
    return...
  4. Re: Java Class : How do I set up a toString method for arrays?

    @ aussiemcgr, much thanks, understand the toString now.

    @Norm
    I just notice examples in my book about that.

    So now I have a little problem understanding the constructor. How would I set it...
  5. Java Class : How do I set up a toString method for arrays?

    I'm having a problem with the toString method, or my code could be wrong. Heres an example:
    public class TestClass
    {
    private TestClass[] a;
    private int[] b;

    public TestClass(int...b)...
Results 1 to 5 of 5