Mohammad Khan

Ranch Hand
+ Follow
since Sep 23, 2008
Merit badge: grant badges
For More
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 Mohammad Khan

No, I don't think there has such way to figure it out.
What is B&S? is that a book you guys refering too.

What study materials you recommend to prepare for SCJD.

Thanks,
Mohammad
[ October 20, 2008: Message edited by: Mohammad Khan ]
Hi Vaibhav,

In my opinion, you should go for 310-065.

After reading each chapter, I didn't correct more than 50% on the chapter exam.

Don't worry about the score you are doing in mock exams.


Thanks,
Mohammad
15 years ago
Hello Ranchers,

Would it be a good idea to go for SCEA without doing developer exam?


Thanks,
K&B was my bible!
Never tried any mock exam.
Never completed master exam of K&B, it was always to lengthy for me.

I studied K&B everyday and followed SCJP forum.

Thanks
Mohammad
15 years ago

OMG I am Toast!



Hey, put some butter on!


Don't worry, you will do much better in exam.
I don't think you need work work experience
but do lots of practice with small program.

Thanks,
Mohammad
s1 = "1"; // created a string object in heap with "1", s1 point to that object
s2 = "2"; // created another string object in heap with "2", s2 point to that object

s2 = s1; // s2 now refer to the object that is referred by s1, which is "1"

ss.go(s2); // passing the reference of s2 to go()

// go() receive a copy of s2 and store in s3, so s3 is reference of "1"
// so you see output "1" from go()
4 is definitely not as the object might be referenced by other reference variable, so its not guaranteed. Also nothing is guaranteed for GC, only something might be eligible for GC.

I am not sure about # 2, but I think primitive stays in stack not heap, so its not eligible for GC. If, I am wrong, please someone correct.

Thanks,
Mohammad

[ October 17, 2008: Message edited by: Mohammad Khan ]

[ October 17, 2008: Message edited by: Mohammad Khan ]
[ October 17, 2008: Message edited by: Mohammad Khan ]


Thanks,
Mohammad
[ October 17, 2008: Message edited by: Mohammad Khan ]
Following code my help to understand the hidden issue here !


Just remember the followings when you try to resolve thread question related to run() and start()

If you have a class that implements Runnable
1. As a contract, you need to implement method run()
2. You still can have method start() in your class, if you want
3. If you have a thread like

you can execute t.start() which would execute MyRunnable#run a new thread.
4. You can execute t.run(), which will do the same of 3, except it won't have a new thread, instead it would execute in main thread.
5. Using reference of t, you can't invoke MyRunnable#start(), If you want to invoke it, you would need a reference of MyRunnable, such as

would execute MyRunnable#start() in main thread, NOT in new thread.

Thanks,
Mohammad
in K&B (310-065)
page: 68
Chapter 1: Declaration and Access Control
TWO-MINUTE DRILL

states that "Classes can have only pubic or default access"
I think, this is true for outer classes but not for inner classes.

Thanks,
Mohammad
Float.NaN return Float, if so, it would return false just like your line # 1

Thanks,
Mohammad