balajee annamalai

Ranch Hand
+ Follow
since May 09, 2007
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 balajee annamalai

Hi Poonam,
Thank god at least you are there for SCJP1.4. I was searching for one who is prepraing for that.Even im doing the same.Can we study together?
Yes you are right this is due to final keyword only.
Beacuse if a variable is declared as final it is compile time constant and the value will be known to the compiler that it is within the range.Try the same program with

final int i=1000; then you will be getting Compile time error.
In case a,Since the value 7 is not avaliable in case statement it prints the value in default and since there is no break avaliable in default it prints both case 2 and 3.

But in the case of example b, The output is straight forward since z is avaliable in a case 'z': it just prints z.
Please give a meaningful subject line.
OK I will use that from now on but can you help me with this question?
I need to know why option (a) is working and not option (b) what is the difference?



Can any one please expain this?
[ April 30, 2008: Message edited by: balajee annamalai ]
Then i have a doubt why then option A is working.
This is beacuse in the (b) option you are declaring int y inside the loop which is not allowed. You can declare like the following,

int y=1;
for(int i=1;<=5;i++)
y=1;
Im preparing for SCJP1.4 and im really new to collections,can someone explain me in detail about collection or which book can i refer to learn collecttion.
Did you compile the java file after removing the method?
Is there an errata list for K&B 1.4
I know that we cannot declare a class as both abstract and final this is beacuse both modifiers are opposite to each other.But i dont understand why cant we declare a class as private or protected is there any reason behind this?
im sending you so many mails and im not getting anyreply from you can you please come online or send me a mail to balu_prg@yahoo.co.in