[java programming] Re: three dimensional array LAB 1036

2009-08-10 Thread Eric Cai
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 > > > &

[java programming] Re: javadoc lab 1011

2009-08-06 Thread Eric Cai
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

[java programming] Re: Overloading question

2009-08-04 Thread Eric Cai
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

[java programming] Re: Lab1007

2009-07-31 Thread Eric Cai
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,

[java programming] Re: Problem with objects, references and identity

2009-07-30 Thread Eric Cai
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

[java programming] Re: Java_array :cannot proceed further to get first names

2009-07-30 Thread Eric Cai
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: > >