Mugdha Deo

Greenhorn
+ Follow
since Nov 30, 2000
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Mugdha Deo


Thanks Panagiotis!
That helps.
-Mugdha.

How many bytes are written to the output file by a FileOutputStream if String "test" is written character by character to the file.
The conversion that I made is ,
4 characters are written, so it is 16*4 bits which is 64 bits.
64 bits is 8 bytes.
But the answer given is 4 bytes.
Can someone help?
Thanks,
Mugdha.

Thanks!
My question is , if there is any particular method for conversion from short to byte.
I mean how did they calculate the answer to be -3.
Thanks,
Mugdha.

Hi all,
This is a question from one of the mock exams.
What statement or statements below are true concerning the following code?
1. class X {
2. public static void main(String[] a) {
3. try {
4. short s = 0x00FD;
5. byte b = (byte)s;
6. System.out.println("b = " + b);
7. }
8. catch (Exception e) {
9. System.out.println("TROUBLE!");
10. }
11. }
12. }

The answer given is b = -3.
Can someone explain me how this conversion from short to byte is done?
Thanks,
Mugdha.

Hello,
Are applets and html included in the objectives for SCJP2?
Also,
In how much detail should one go for collections?
I find it a very vast topic.
Thanks,
Mugdha.

So,
What is the final answer of the original question?
-Mugdha

Congrats !
That's a really good score.
Can you please let me know about where I can get good material(notes and some questions) for Threads and Collections?
I appreciate your help.
Please reply to mugdhadeo@yahoo.com
Thanks and good luck,
Mugdha.
23 years ago
This is a question from Marcus Green exam #1
Question 19)
You are browsing the Java HTML documentation for information on the
java.awt.TextField component. You want to create Listener code to respond to focus
events. The only Listener method listed is addActionListener. How do you go about
finding out about Listener methods?
1) Define your own Listener interface according to the event to be tracked
2) Use the search facility in the HTML documentation for the listener needed
3) Move up the hierarchy in the HTML documentation to locate methods in base
classes
4) Subclass awt.event with the appropriate Listener method
My question is , Is javadoc part of SCJP?
Thanks,
Mugdha.

Hello,
I am preparing for SCJP and am wondering where I can get good material(and lots of questions) on Threads and Collections.
Thanks,
Mugdha.

Aren't suspend and resume methods depricated?
So, shouldn't the answer be c ?
Thanks,
Mugdha.
24 years ago

So,
Does it mean that upward casting or explicit casting always result in runtime errors?
Thanks,
Mugdha.

This is a question from marcus greens's exam # 1. Q17
I thought the answert would be 1, but the answer is 3.
Can some one please explain?
Thanks,
Mugdha.

What will happen if you attempt to compile and run the following code?
1) Compile and run without error
2) Compile time Exception
3) Runtime Exception

class Base {}
class Sub extends Base {}
class Sub2 extends Base {}
public class CEx{
public static void main(String argv[]){
Base b=new Base();
Sub s=(Sub) b;
}
}
Congrats Shubhangi!!
Can you let me know your email contact, if its ok to contact you re:exam tips?
Thanks,
Mugdha.
24 years ago