Hi,
It is in System.out.println("ages[2].length = "+ages[2].length);
You see that 2 is out of bounds .
You define an array of size 2. And you should use 0-1 to Index it.
Thanks,
Eric Cai
On Mon, Aug 10, 2009 at 2:47 PM, Quentin wrote:
> Good day all
>
>
>
&
Luck!
Anyway, you can refer to the document manually.
Hugs,
Eric Cai
On Thu, Aug 6, 2009 at 6:49 AM, David Seto wrote:
> Lab 1011 exercise 4
>
> Modify StaticAndInstanceMethods.java as shown in Code 2.3
>
> When I selected char f= String.CharAt(2) - Right-clicked and selecte
defined another class for example Foo which extends object
that null can also be interpreted to, you will get a error of ambiguous
method.
add which like:
void method(Test str) {
System.out.println(str);
}
Try it yourself.
Hugs,
Eric Cai
On Tue, Aug 4, 2009 at 3:36 PM, Babu Rajendran
Hi,
I think that the problem is about "cast"
//evaluates '1'-'0' to what? How do you subtract literals?
intEq[i] = currChar - '0';
char has been cast to int implicitly when you do the '-' job.
Hugs,
Eric Cai
On Fri, Jul 31,
u do it for a second time.
To solve just using .equals() method instead of "==".
In Example 3
Because String is inmutable, each time you set a new string, you will get a
new String Object.
So use .equals() instead as well.
Hugs,
Eric Cai
On Thu, Jul 30, 2009 at 10:56 PM, RPGoldie
Dialog("Enter fullnameuntil" + totalnames
+ "are entered")+",";
}
System.out.println(name.split(",",2)[0]);
}
}
Due to the help of dear Ashok, the solution may like this?
Hugs,
Eric Cai
On Thu, Jul 30, 2009 at 6:18 PM, devika shukla wrote:
>
>