This week's book giveaway is in the Java in General forum.
We're giving away four copies of Event Streams in Action and have Alexander Dean & Valentin Crettaz on-line!
See this thread for details.
Win a copy of Event Streams in Action this week in the Java in General forum!

Keen Chen

Ranch Hand
+ Follow
since Nov 12, 2002
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 Keen Chen

Howdy all!
I got the new assignment too.....
and I had sent a mail to sun,
waiting for their reply msg...
int a = i++ - ++i; ->
a = 0 (operator = 0, but now i = 1) - (operator++, i = 2)
i think,
synchroinzed() code block mayn't make a thread stop if the thread can obtain the object lock immediately .(for example, it's the only thread be stated)
"exit synchronized code" can't make thread stop running;
setPriority() may make the running thread stop.
Thanx all the friends here.
Certainly I'll stay aroud here, to learn more java, and learn more oral English.
to Ken Krebs : Hi! dear friend, sent u a private msg about two weeks ago, got it? u ever studied Chinese? ha ha, maybe we can help each other in learning English and Chinese. I wish we can keep in touch.
to Mike Lin:
Some words to the exam....
First of all, be circumspective.
and , i think , it looks like the questions were arranged by hard level. I encountered many thread questions from Q1-Q20. follow questions are easy and easier.... maybe u can do it from the end question. Maybe we can chat in Chinese, my msn: keen_chan@msn.com
16 years ago
Hi:
because u can't determine when the thread acturally to run after u invoked start() method.
in this question, it maybe run before the assignment, of after.
// maybe thread run
sa[0] = "A";
// maybe thread run
sa[1] = "B";
// maybe thread run
sa[2] = "C";
// maybe thread run
HI, I think because in ur code, the exception is a handled exception. it's caught correctly.
A HA~~~ ~~~~~~~~~~~~~~~~~~~~`
spend nearly 2 monthes,
I beated it down!
Many many words wanna say,
Thanxxx a lot to
Mr. Dan, ur mock is so good and so hard than the real thing. do u remember? i ever asked u about two weeks ago: Can i passed the exam ? those days, i always got 6-7 error/ 19 question in your mock. now i can say, if (ur_mocks_hard_level == 10) the_real_thing_level < 5. yes, just like a walk in the park.
Jessica Sant, It's u , reply my first post here. so kind feel. thx a lot
Marcus Green, so great ur mock is. nearly the real thing. i passed ur mock2 57/60.
and Ken Krebs , my dear old brother. so smart u are!
and, i think ,there may be many errors (or typos?) in the real exam questions, like atch and
have a { , but not have a }
(sorry, so pool my english is )
ok!
now! off to scjd now~~~~~~~~~~
16 years ago
hi,Alfred, yes, i konw
and i know why abs(Integer.MIN_VALUE) still equals itself. ,it's a exception.
but, that's not question.
the question which we are talk about is :
is that expression RIGHT?
because the EXCEPTION, reduction to absurdity , the expression is error.
at least, it's not accurate .
That's all
because -1 is a literal,
not a var

if RHS is a compile-time constant, and in the range of the LHS, the assignment is accepted by jvm
oh?
API say that?
ok, Interger.MIN_VALUE, IS IT NEGATIVE?, yes.
Math.abs(Integer.MIN_VALUE) == Integer.MIN_VALUE.
SO , API HAVE ERROR.
OH
That is the latest version Dec. 4
Thx a lot for Your hard working for us.
Topic -> Lang -> Math
Q 14:
Question 14
Which of the following statements are true in terms of the java.lang.Math.abs method?
a. Four overloaded versions of abs exist.
b. An ArithmeticException is declared in the throws clause.
c. The type of the return value depends on the type of the argument.
d. The returned value is always of a floating-point primitive type.
e. If the argument is greater than or equal to zero then the returned value is equal to the argument.
f. If the argument, arg, is less than zero then the returned value is -arg.
g. None of the Above
answer: a c e f
sorry, i don't think F is correct.
say
Math.abs(Interger.MIN_VALUE) == Integer.MIN_VALUE.
First , thanx for Mr.Marcus Green's mock.
I took exam 2 today, socore 57/60 .
but, some doubts:
1> there are so many questions about AWT and IO,it is for 1.2 exam?
2>
Question 42)
Which of the following statements about threading are true
1) You can only obtain a mutually exclusive lock on methods in a class that extends Thread or implements runnable
2) You can obtain a mutually exclusive lock on any object
3) A thread can obtain a mutually exclusive lock on an object by calling a synchronized method of that object.
4) Thread scheduling algorithms are platform dependent
Answer 42)
Objective 7.3)
2) You can obtain a mutually exclusive lock on any object
3) A thread can obtain a mutually exclusive lock on an object by calling a synchronized method of that object.
4) Thread scheduling algorithms are platform dependent
Yes that says dependent and not independent.
BUT, about answer 2), i believe , should be "You can obtain a mutually exclusive lock on any object which have some synchronied block or method". right?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~