File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Mock Exam Errata and the fly likes Boone 1.1 Mock #40 Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Mock Exam Errata
Reply Bookmark "Boone 1.1 Mock #40" Watch "Boone 1.1 Mock #40" New topic
Author

Boone 1.1 Mock #40

Eric Barnhill
Rancher

Joined: Feb 25, 2000
Posts: 226

Question:
Construct an array of 3 String objects containing the strings "a", "b", "c", using the {} notation. Call the string by the variable name s.
Answer:
String s = {"a","b","c"};
shouldn't there be an indication of an array somewhere? I get a compiler error with this. My answer was String[] s = {"a","b","c"};
Eric
Ashish Thakur
Greenhorn

Joined: Mar 18, 2000
Posts: 22
In my opinion ur answer is fine.
when u said :
shouldn't there be an indication of an array somewhere? I get a compiler error with this. My answer was String[] s = {"a","b","c"};
the "this" meant the previous code right?, cause ur code will not have a problem unless u try to declare it within a method.
Also the question is quite out of line when it says
"Call the string by the variable name s" it should have said,
"Call the array by the variable name s" or
"Call the string array by the variable name s"
Anybody has any other opinion??

Eric Barnhill
Rancher

Joined: Feb 25, 2000
Posts: 226

Yes, I did mean the previous code but it wasn't clear. Thanks for the reply.
Eric
maha anna
Ranch Hand

Joined: Jan 31, 2000
Posts: 1467
Eric,
I also seen this qstn somewhere while I was preparing for the exam. But I don't remember what the author said. Where is this qstn from. We can move to Errata.
regds
maha anna
Eric Barnhill
Rancher

Joined: Feb 25, 2000
Posts: 226

I took it here but I don't think this is the official place for it.
Eric
maha anna
Ranch Hand

Joined: Jan 31, 2000
Posts: 1467
Ok. This post is all set to go to our Errata Forum. Thanks Eric.
regds
maha anna
 
IntelliJ Java IDE
 
subject: Boone 1.1 Mock #40
 
Threads others viewed
Correct me!!!
Question about nested class
How to sort array of string
Barry Boones Mock Exam newtest.html
strings
developer file tools