This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
As you can see here there will be an compile time error based on incompatible referencing,and this was the probable answer given in Jxam.And this was the only one given by them. But they have missed one that is also correct. ie. The program will compile if the first line is altered to String s = new String("abcd");
this change will make it compile and run
Thanks Steven
Manfred Leonhardt
Ranch Hand
Joined: Jan 09, 2001
Posts: 1492
posted
0
Hi Stephen, I agree with you. I have wrote to the JXam site, but they haven't provided any fixes or new version yet. Manfred.
sandeep bagati
Ranch Hand
Joined: Feb 22, 2001
Posts: 62
posted
0
Hi stephen There is Nothing wrong with first line The Program will work perfectly if you typecast Object to String at line 2 as String s=(String) o;