Jason

Ranch Hand
+ Follow
since Dec 06, 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 Jason

Hi everyone
I am pretty new to this site, but just wanted to say thanks for putting it all together - I will definitely be here more often.
Also thanks to the quick reply to my 'day before exam' question.
Anyway, I passed yesterday with 83%.
Starngely enough, I found the exam a little easier than I expected - I actually got a better result in the real thing than on alot of the mocks.
So, from my experience - don't panic, don't stress - and everything should be fine!
Thanks again
Jason
21 years ago
hi everyone
PLease can someone tell me what the new passing score is??
The sun site says it has changed but I can't seem to find what it has changed to!
I am writing tomorrow and would love to know before that!!!
thanks
jason
Sorry, continue my posting.
My next step is to take SCJD or SCJA, any idea where I am going to go for the site like this, but focusing on the developer's issues.
I came across the SCEA test from Roseanne Zhang's site, but I do not know what that stands for?
Anybody give some guidances.
Hi,
I passed SCJP2 one hr ago, and I just want to take this opportunity to thank all of you active on this forum and helping others. Especially to Tony, Ajith, Moha and Jim and Satya as well. I have been following Javaranch for about one month, and roundup game is fantastic introductory gateway to your SCJP2.
I also want to recommend this site to all the java novices who are aiming to get certified. Reading, Learning and Answering will definitely build up your knowledge.
I benefit a lot from this site.
Thanks all others who have been participating in answering my questions.
I just came across this question in my preparation for SCJP2.
Here is the code:
abstract class Mammal{
public Mammal(){}
abstract Mammal giveBirth(); }
class Dog extends Mammal{
public Dog (){}
//here is the overriding version of giveBirth()
Dog giveBirth(){}
}//class Dog ends.
I believe the above subclass version of giveBirth() is a legal case of overriding although the return type is subtype of the one declared in parent.
Any idea or comments?
Hi, Satya;
I need a copy of MindQ mock test too.
I will take test tomorrow, and I will be so grateful if you can send me via email today. Hope you will appear in today's posting.
Sorry for short notice.
my email: hlwang@neuron.uchc.edu
Best regards;
Jason
Hi,
Java has its strict rules for source file. i.e. there is at most one public class/interface per file and the file name must be identical to this public class/interface.
but what if there is no public class/interface? How to name source file? I have doubt about this because I just came across a review question at Jaworski site : it says that if there is no public class/interface, the name of source file must be differenct than its class/interface. I think here you can name your source file as the class with main() method .
Plz clarify this question for me.
thanks in advance.
Hi,
Not 100% true, the fact of matter is that when an anonymous class implements an interface, it also implicitly extends Object class.
Regards,
Hi, Can anybody explain the output of the following code?
public class Test{
double d1=1.0;
double d2=0.0;
d1=d1/d2;
byte b = (byte)d1;
public static void main (String[] args){
System.out.println("b value is" + b);
}}
the given answer is -1. the mysterious part of this code is the casting d1 to b (which is of type byte). But at this moment d1 is infinity. How can this be done?
Hi, Daniel and Ankur;
Answer 1 is absolutely wrong, it would have been right if it is phrased like this: an object will be eligible for gc (note that it is not guaranteed that it will be deleted)when they can be no longer referenced by any reference.
So, IMHO, 3, 5 would be correct, but I am not sure about 4, I will choose it.
Correct me if I am wrong.
This question appear in IBM mock exam:
I doubt if there is a correct answer:
8)
Which of the following declarations of a top-level class Frog are legal, assuming Animal is an existing class?

a) protected class Frog extends Animal {

b) private class Frog extends Animal {

c) transient class Frog extends Animal {

d) native class Frog extends Animal

Any help will be appreciated!
Hi, Marcus and Tony;
sorry about the posting.
the reason I did not put up my opinion there is that I disgree with any one of given answer. I think this code should compile ( sorry, my computer is out on strike again ) and the final appearance should be that the panel occupies the first column of the frame and two buttons are displayed and each is half of the height of frame and one third of frame width (Frame is laid out one row and three column).
any comments?

This is a multiple choice question, the only answers I am pretty positive are B and E, but what about other choice like A and D.
I don't have a clue whether they are correct.
Plz shed some lights on, Java experts.
With respect to User and Daemon threads, which are true?

a) Daemon threads can not be destroyed

b) Running User threads prevent a JVM from terminating program

c) Running Daemon threads prevent a Java VM from terminating program

d) Daemon threads can not be grouped together

e) The JVM can terminate program when only daemon threads are running

what will happen when the following code is run?

27)
What does the following paint() method draw:
1. public void paint(Graphics g) {
2. g.fillRect(20, 20, 50)
3. }
a) A square with sides of 50 pixels each, placed 20 pixels from the x and y axis

b) This code will not compile.

c) A black square.

d) A square with sides of 20 pixels each, placed 50 pixels from the x and y axis.


Can somebody tell me the correct answer for this question:
Assuming the code below is part of a Frame subclass, which are true?
1.public LayoutFrame() {
2. setLayout(new GridLayout(1, 3));
3. Button b = new Button("What is b location?");
4. Button a = new Button("What is a location?");
5. Panel p1 = new Panel();
6. p1.setLayout(new GridLayout(2, 1));
7. p1.add(a);
8. p1.add(b);
9. add(p1);
10. }
a) Two push buttons are added. Each is half the width of the Frame and the entire length vertically, with a above b.

b) There is a compile error since there is no receiving object specified for the methods in lines 2 and 9.

c) Two push buttons are added, each just larger than the size of the label and located in the center of the Frame.

d) There is a compile error since the superclass constructor is not called.

e) Two push buttons are added. Each is half the size of the entire Frame vertically and the entire width, with a above b.

any comments are appreciated!