kannan al

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

Recent posts by kannan al

Thanks Ajith, Murphy and Mukherjee.
Regarding your Q's Mukherjee:
1.break ups, as per previous posts of other friends and no
change in that.

Don't worry about the long codes, the code to analyse
will be only 6 to 10 lines. Other lines will be only
class names , method names, opening and closing braces.
2.Type in Questions: I had about three type in questions.

3.Exihibit button: Don't worry about the exihibit button.
It is very very simple. Before taking the exam request
the incharge(in the Test center) to explain you about
all these buttons.

4.Next, Servlet/JSP or SCJD. Can anybody tell me the subjects
to cover for the SCJD.

regds.
kannan.

------------------
23 years ago
Hi friends,

Yesterday I had cleared the SCJP exam with the score of 70%.
The exam was not at all tough.But,I had worked hard for the
past four months(really hard,because I had no prior experience with
any language and I started from scratch). In the last four months I
would have worked out around 300 codes. I had done two mini projects
also.

I should thank javaranch for obtaining that breaking score of above 61%.
Last 10 days postings on Strings,threads.... really helped me to obtain that
breaking score.

I would have definitely got a better score but the pressure started building
up during the exam time.Once the pressure starts building up , the brain refuses
to react. Somehow I managed. So, aspiring SCJP's try to get relaxed as much
as possible. If you are in a relaxed state,definitely it will help you.

Thanks everybody and once more Thanks Javaranch.

kannan.


23 years ago
Dear friends,
This is an example from Khalid' book:
class Light{/*....*/}
class LighBulb extends Light{/*....*/}
class SpotLightBulb extends LightBulb{/*...*/}
class TubeLight extends Light{/*....*/}
class NeonLight extends TubeLight{/*....*/}
public class WhoAmI{
public static void main(String[]args){
boolean result1,result2,result3;
Light light1 = new LightBulb();// (1)

// String str = (String)light1;//(2) Compile time error.
// result1 = light1 instanceof String;//(3) Compile time error.

result2 = light1 instanceof TubeLight;//(4) false Peer class.
// TubeLight tubelight1 = (TubeLight)light1 ;//(5) ClassCastException.

result3 = light1 instanceof SpotLightBulb;//(6) false superclass.
// SpotLightBulb spotref =(SpotLightBulb)light1;//(7) ClassCastException.

light1 = new NeonLight(); //(8)
if(light1 instanceof TubeLight){ //(9) true
TubeLight tubelight2 = (TubeLight)light1;// (10) OK
}

}
}

Now, (friends) please clarify line(5) and line(10).
The ref light1 at(5) denotes the object of class LightBulb.So both Tubelight
and LightBulb are peer(unrelated) classes.So,why ClasseCastException being
thrown instead of Compile time error.

At line (10) the ref light1 denotes the object of class NeonLight and is a
subclass of TubeLight.So,why the cast (TubeLight) has become necessary at
that point.

if somebody clarifies, it will be helpful.
Thanks,
kannan.
Hi friends,
This one is from Javachina.

public class Test{
public static void main(String[] args) {

Object a = new Object();
Object b = new Object();
Object c = new Object();
Object d = new Object();
d=null;

d=c=b=a;
}
}

How many objects are eligible for garbage collection ?
kindly let me know.
Thanks,
kannan.
What can cause a thread to stop executing?
1) The program exits via a call to System.exit(0);
2) Another thread is given a higher priority
3) A call to the thread's stop method.
4) A call to the halt method of the Thread class
Q 2: When another thread is given a higher priority, will a thread
stop or move into a ready to run state.
kindly clarify.

Thanks,
kannan.
[This message has been edited by kannan al (edited October 08, 2000).]