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.
The moose likes Mock Exam Errata and the fly likes On String Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Mock Exam Errata
Reply Bookmark "On String" Watch "On String" New topic
Author

On String

Stephen Joseph
Ranch Hand

Joined: Dec 29, 2000
Posts: 50
Errata: Jxam

<code>
1. Object o = new String("abcd");

2. String s = o;

3. System.out.println(s);

4. System.out.println(o);

</code>

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
Lokesh Mahajan
Greenhorn

Joined: Feb 01, 2001
Posts: 22
Hello Dear
I dont find any thing in it I think you are missing some thing ,your point i am not getting it.
lokesh mahajan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: On String
 
Similar Threads
Jxam question errata
Another Jxam question
Strings
JXAM Qs....
Jxam String question