kalpana appala

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

Recent posts by kalpana appala

Hi Suresh
Congrats.. Wonderful Score
20 years ago
I am also thinking that one of the answers for the first snippet is 'C'.
Can anyone explain whether 'C' is correct or not???

Thanks
kalpana
I am also thinking that one of the answers for the first snippet is 'C'.
Can anyone explain whether 'C' is correct or not???

Thanks
kalpana
Hi ranchers
Sorry for the incompleted question in the previous forum. Below is the completed question

The answer for the above code is d.
But i thought the answers are b,d . Can anyone explain why b is not a correct answer. I read that constant can be a member of an interface.

Thanks
kalpana
Hi

Hi

For the above code one of the answers says the following is true
"The assert statements are being used to check a precondition--something that must be true when the method is invoked".
Is that statement always true??? In other words: is it a general statement?
In some other question the above statement is listed as not true.
Can someone explain the meaning of that statement and the relevance for the above code.
Thanks a bunch
Hi
Thanks for the reply. I got it now. I forgot to check the condition i++<7 when i reaches 7.

kalpana
Hi
Thanks for the reply. I got it now. I forgot to check the condition i++<7 when i reaches 7.

kalpana
Hi sricharan

Thanks for the reply. What I understood from the code is i is incremented to 2 in the first loop , to 4 in the second loop etc. May be i am seeing the code in a different way . i is incrementing twice when j--< 7 is false and while checking the condition i++ < 7. so the value of i is 6 till the third loop. Am i missing something here.
please explain it clearly.
Thanks kalpana
Hi ranchers

I thought the o/p is 9,3. But the answer is 8,4.Can anyone explain it clearly and i am totally confused about the increment operators .
Thanks in advance
kalpana
Could anyone explain why the following code gives complile time error.



The explanation says that as the switch statement is unreachable , it gives compile time error . I dont understand that if the statements are unreachable why it is giving compile time error. Am i missing something here???

Thanks in advance
Hi Sekhar
Congrats Its a very good score.
20 years ago
Hi Mohana
The link is not working.Could u please send me a copy of scjp notes to this id
[email protected]
Thanks
Thanks for ur help guys
kalpana
Hi
I am new to JavaRanch.This site is very helpful.
Can any one explain why B.run() is not invoked in the following program

class A extends Thread {
public A(Runnable r) {super(r);}
public void run() {System.out.print("A");}
}
class B implements Runnable {
public void run() {System.out.print("B");}
}
class C {
public static void main(String[] args) {
new A(new B()).start();
}
}
The answer is A
I appreciate ur help
Thanks
kalpana