Win a copy of Terraform in Action this week in the Cloud forum!

kalpana appala

Greenhorn
+ Follow
since Feb 19, 2004
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 kalpana appala

Hi Suresh
Congrats.. Wonderful Score
17 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.
17 years ago
Hi Mohana
The link is not working.Could u please send me a copy of scjp notes to this id
kalpana_appala@hotmail.com
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