fei peng

Ranch Hand
+ Follow
since Sep 15, 2003
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 fei peng

Hi,every one,
I'm working on a servlet web application,this program need access Database,several free db connection pools download from internet
are try,but all they are not stable,so if anyone know one(no matter free or sold),please recommoned it to me.
hi,every.
I'm new leanner to SCWCD,use the sybex's book.when I do its excersice,encounter a problem,but its explain is not clear enough.
the question is follow:
>>-------------------------------------
which of the following request header tags is inaccurate?
a....
b....
c.User-Agent:Mozilla/4.0 (compatible;Windows NT 5.0)
Accept:image/gif,image/jpeg,image/jpeg,
application/vnd.ms-excel,*/*
Content-Type:text/html
Host:localhost:8080
d....
>>-------------------------------------
the answer is c,I want know what's wrong with this answer.thanks
congratulation, Dixit.I just pass scjp,and be prepare for SCJD.
17 years ago
I miss 3 question,It's all in Thread part,and the 2nd check is useful,I found several wrong.
Thank you all who have even help me in this saloon.
17 years ago
thank you all,
and thank you,Bert Bates.Your book give me great help to be ready for SCJP
Hi,every one.
I have a question here.
question:Here is a method which creates a number of String objects in the course of printing a count down sequence. When the program reaches line 8, how many of the String objects created in line 5 are eligible for garbage collection? Assume that the System.out object is not keeping a reference.
1.public void countDown()
2.{
3. for( int i = 10 ; i >= 0 ; i-- )
4.{
5.String tmp = Integer.toString( i );
6.System.out.println( tmp );
7. }
8.System.out.println("BOOM!");
9.}
a.)none
b.)0
c.)10
d.)11
I think the answer is d,but the answer is c,they explain that though out of its scope,the local variable 'tmp' keep its one reference in line 8.
I don't understand how a variable can keep its reference even out of its scope.what's the rule here?
Hi,Mussarat Aziz :
I am in the simily situation with you,I ready to take the exam in 2 weeks,
And I am not sure how much possibilty it has to pass ,I just plan take
10 mock exams(of J@Whiz 1.4), if the last 3 tests score is in the scope 80--100 every, I will have enough confidence to succeed,may be this method suit you.
good luck.
thank for your recommendation resource, Valentin.
I try (5.8%3.2),the resurt is oddity like the one ko ko give,is 2.5999999999999996.
should I just leave it along,and hope the SUN don't give me a question like this in exam?
In lee's post,The object reference is changed by assignment,but no matter
how it be changed, it happen in method,I think this question is not discribed well.
thank for you all.
Hi,everyone:
I think % should be used on only integer,but I excute :
System.out.println("this "+(5.3%3.2));
It print "2.0";
what is the alogrithm in this senario?
Hi,Ko Ko Naing
Java is actually pass by value for all variables running wthin a single VM(in K&B's book P184),it's true;
and I think the "object" is different from the "object reference",the last one is just a bit pattern like integer,when pass a object into a method
,a copy of this bit pattern is passed ,so origin "object reference" will never be modified in this method,
this is the reason that I can't agree the question's answer
Hi,every one.
The following question is form J@Whiz1.4:
Which of the statements below is true?
a.)Object references can be converted in assignments but not in method calls.
b.)Object references can be converted in both method calls and assignments, but the rules governing these conversions are very different.
c.)Object references can never be converted.
d.)Object references can be converted in both method calls and assignments, and the rules governing these conversions are identical.
e.)Object references can be converted in method calls but not in assignments.
I think the answer should be A,although the object its self may be changed
in a methode,the object refrences can't been changed in the method,because
it is passed into the methode by value,the object itsself is different with is references
but the answer is D.
what's wrong with my understanding to this question?