This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes IBM Mock Exam Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "IBM Mock Exam" Watch "IBM Mock Exam" New topic
Author

IBM Mock Exam

sabyasachi mondal
Ranch Hand

Joined: Dec 26, 2000
Posts: 33
Originally posted by Satheesh Kumar:
Hi,
Here are some questions from ibm mock exam can somebody help me to find the answers - Yes I am also seeking help from the Big Java guys (hey you deserve so!). Please follow:
Thanks.
mondal

1. An applet is more restrictive than an application in the following ways: (2 choices)
a) An applet may not perform local disk I/O.
b) An applet may not connect with any server except the
server where the applet was loaded from
c) An applet can change the CODEBASE
d) An applet cannot call the update() method directly
2) ThreadGroup class instances: (2 choices)
a) Allow threads to be manipulated as a group
b) Provide support for ThreadDeath listeners
c) May contain other ThreadGroups
d) Must contain threads of the same type
3) Primitive type wrapper classes: (3 choices)
a) Allow primitive types to behave as reference types
b) Allow operator overloading to be implemented for
primitive numeric types
c) Provide string parsing and conversion methods
d) Provide arithmetic operators such as plus and minus
e) Are provided for all primitive types, including void
4) The following are true of Java character-oriented streams:
(2 choices).
a) They provide support for character conversion between
Unicode and ASCII
b) They all implement the CharacterStream Interface
c) They inherit from either the Reader or Writer abstract
classes
d) They are restricted to 2^16 (2 raised to power of 16) in
length
5) Which of the following method pairs are best used for controlling thread communication?
a) stop() and resume()
b) wait() and notify()
c) threadWait() and threadNotify()
d) run() and destroy()
6)if(a) {x=y;} else{x=z;} can otherwise be writtern as
a) a=x?x=y:x=z;
b) x=a?x=y:x=z;
c) x=a?y:z;
d) a=x?y:z;

Rishi Yagnik
Ranch Hand

Joined: Jan 04, 2001
Posts: 84
hi friends,
i am just sending u an ans for the same Questions
Ques: Ans
1 a,b
2 a,c
3 a,c,e
4 a,c
5 b
6 c
i hope u will find explanations in yr cert books pls correct me if i am wrong
i am on last stage for my cert studies.
Rishi
sabyasachi mondal
Ranch Hand

Joined: Dec 26, 2000
Posts: 33
Originally posted by rishi, yagnik:
hi friends,
i am just sending u an ans for the same Questions
Ques: Ans
1 a,b
2 a,c
3 a,c,e
4 a,c
5 b
6 c
i hope u will find explanations in yr cert books pls correct me if i am wrong
i am on last stage for my cert studies.
Rishi

Thanks a lot Rishi. I wish you good luck in your expectation.
Regards,
mondal
Edy Yu
Ranch Hand

Joined: Nov 21, 2000
Posts: 264
I think there is a typo in 6):
x=a?y:z
has to be changed to x==a?y:z
IBM does give us a bunch of wierd questions!


<i><br />Sun Certified Programmer for Java 2 Platform (SCJP)<br />Sun Certified Developer for Java 2 Platform (SCJD)<br />Sun Certified Web Component Developer for Java2 Platform, Enterprise Edition (SCWCD)<br />Sun Certified Business Component Developer for Java2 Platform, Enterprise Edition (SCBCD)<br />Sun Certified Enterprise Architect for J2EE (SCEA)<br />IBM Certified Enterprise Developer, WebSphere Studio V5.0<br /></i>
Sean Casey
Ranch Hand

Joined: Dec 16, 2000
Posts: 625
There isn't a typo in question six. The Conditional Operator ?: uses "=" not "==". I've referenced in Khalid, and RHE.
Carl Trusiak
Sheriff

Joined: Jun 13, 2000
Posts: 3340
The ternary operator requires
(boolean Expression) ? (true value) : (false value);
You can do an assignment in the boolean expression if the result is true or false. 6 doesn't show what the data types are for any of the variables but we can assume that a is the boolean (Because of the if(a))expression so it would be
x = a ? y : z ;
This is clearer what is going on as
x = (a?y:z);
You may see something like
int a = 0;
int b = 1;
int x = 1;
int y = 2;
int z = 4;
x = (a == b) ? y :x ;
Any thing before the ? must evaluate to true or false.

[This message has been edited by Carl Trusiak (edited January 11, 2001).]


I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
Cherry Mathew
Ranch Hand

Joined: Dec 26, 2000
Posts: 159
about Q2 is void a primitive type
natarajan meghanathan
Ranch Hand

Joined: Feb 01, 2001
Posts: 130
Void does not wrap any primitive value. It only denotes the Class object representing the primitive type void.

Sun Certified Programmer for Java 2 Platform
 
Consider Paul's rocket mass heater.
 
subject: IBM Mock Exam
 
Similar Threads
doubts from ibm test
java.io question from IBM -Please answer
Ibm mock questions
About Wrapper Classes
IBM Mock test