Win a copy of Head First Android this week in the Android forum!

Cristi Tudose

Ranch Hand
+ Follow
since Dec 25, 2000
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Cristi Tudose

double d=10.0/-0 is Double.POSITIVE_INFINITY
is that way bcos -0 is actually 0 and further binary promotion is applied to 0.0 ???
plz,confirm
rgds,
cristi
meanwhile i cheked the Sun site
thanks anyway
hi everybody,
for some reason,I could't enjoy this site
for almost 1 and half month
there are something new I should know regarding SCJP2?
plz notify me
thanks in advance
cristi
Hi Manfred,
what about choice 4?
rgds,
cristi
definetly 1,5 are correct
and i say 2 works fine also

so,why choice 2 is not a valid answer?
Q1. Which of the following will add a Component 'comp' to a container 'c', if it's layout is governed by GridLayout 'g'?
Select all 3 correct choices:
1.c.add(comp);
2.c.add("Center",comp);
3.g.add(comp);
4.g.addLayoutComponent("CompName",comp);
5.c.add(comp,-1);
I checked 1,2,5(even 2. .They gave correct answers as 1,4,5.
Please an explanation.
Q2.Which of the following statements about hashCode() method of Object class are true?
Select all 2 correct choices:
1.is a native method;
2.it return int;
3.it return long;
4.it cannot be overriden;
5.none of the above.
To me only 2 seem correct answer.
API states ublic int hashCode();
if I run javap java.lang.Object the definition is public native int hashCode().For the exam purpose should I know this?
Please confirm.
In "Conventions for Questions" section from Sun states:

So, a sample question could be "Select all 3 correct choices" with definitely 3 correct answers and not "Select all correct answers".Am I understand right?Please confirm.
I asked because almost mock exam have the last form in questions.Till now,I've seen first form only in jq+ mock exam.
cristi
Q:In which of the following cases a thread will definitely be alive but not be running?
A:They gave as methods sleep(),wait() but not yield()
I suppose bcoz yield() relay on JVM?
Please confirm
rgds,
Cristi
First,sorry for post this topic in 2 forums
I was inattentive.
As you say Jane deep...
But could we meet in real exam such questions???
And in such case,what answers should we checked?
best rgds to all,
cristi

20 years ago
Hi Panagiotis,
I had the same problem in understanding.
For me,the answer is at intuitive level
and I have nothing more to say that what Bill said(i see the same reason)
Your code runs corectly(JDK1.3) and states an acces of an
inhereted members from a class other than outer(fully qualify)
rgds,
Cristi
Hi Jane,
What you say is perfectly right about the exam.
But,why is this order and not B ?
Am I missing something ?
best rgds,
cristi

Originally posted by Jane Griscti:
Hi Cristi, Zheng ...
The SCJP Exam expects you to understand what will happen when code is compiled from the command line using JDK 1.2.
When studying, it is safest to only use Sun's JDK; IDE's often add code or implement the JVM differently.
Jane


5. What is the Thread output?

A) Executing the myTest() method
Executing run() method
B) Executing run() method
Executing the myTest() method
C) No output
D) Compile time error
The answer they give is A)
Could some explain why and, more important if that anytime the
output is A)?
I ran the code with an IDE with Debug and the output was anytime B)
how this happens?
thanks in advance
rgds,
cristi
5. What is the Thread output?

A) Executing the myTest() method
Executing run() method
B) Executing run() method
Executing the myTest() method
C) No output
D) Compile time error
The answer they give is A)
Could some explain why and, more important if that anytime the
output is A)?
I ran the code with an IDE with Debug and the output was anytime B)
how this happens?
thanks in advance
rgds,
cristi

20 years ago
Jane thanks for your promtness.
also,Vladimir
things come clear now
best rgds,
cristi