Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

shameena Hussain

Greenhorn
+ Follow
since Jul 05, 2005
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 shameena Hussain

when the thread's run() method is called directly,it doesn't start a new thread...it ll run the existing thread... so, t1 is printed the second time also
hi friends,



The output of the above code is GFC206,GFC206
but,




but, executing this code results in compile time error..
i think both the methods are almost same...can somebody explain me why this difference in output?
hi friends,
i m preparing for SCJP. I feel that Dan's questions are a bit tough..
the real exam also having the same tough level or is it tougher than this??


hi,
i still have a doubt...
when color2 is not an instanceof blue, b2 shd be assigned with false.
but is it like this,
The two objects having super-sub class relationship can only be compared using 'instanceof'?
clear my doubt

thanks in advance
class GFC211 {} class GFC212 extends GFC211 {}
class GFC213 extends GFC212 {
static void m(GFC211 x, GFC211 y) {System.out.print("GFC211,GFC211");}
static void m(GFC211 x, GFC212 y) {System.out.print("GFC211,GFC212");}
static void m(GFC212 x, GFC211 y) {System.out.print("GFC212,GFC211");}
static void m(GFC212 x, GFC212 y) {System.out.print("GFC212,GFC212");}
static void m(GFC211 x, GFC213 y) {System.out.print("GFC211,GFC213");}
public static void main(String[] args) {
GFC213 gfc213 = new GFC213(); m(gfc213, gfc213);
}}


i think method m(GFC212 x, GFC212 y) will be invoked.
but the output is compile time error??
why is it an error???
hi friends,
consider the following code,
i thoght
b1,b2,b3 are assigned with values true,false and false respectively,
but the answer given is "compile time error"..
can somebody explain me how that comes???


class Color {}
class Red extends Color {}
class Blue extends Color {}
class A {
public static void main (String[] args) {
Color color1 = new Red(); Red color2 = new Red();
boolean b1 = color1 instanceof Color;
boolean b2 = color1 instanceof Blue;
boolean b3 = color2 instanceof Blue;
System.out.print(b1+","+b2+","+b3);
}}
ya, i would like to join this group... i m following K&B book
thank you sameer..
and all the best to you...
hi friends,

wat is the output of the following code,

System.out.print(Long.toHexString(Character.MAX_VALUE))

and also explain me how it comes..


thanx in advance
thanks for ur information...
hi friends,
i m a new member to this group... i m planning to write SCJP exam.. can somebody tell me how to register for the exam ???
plz help me...
hi
hi friends,
i m preparing for SCJP exam.. can somebody tell me, how to prepare for the exam... plz provide the links for mock exams
15 years ago