prarthana reddy

Ranch Hand
+ Follow
since Jul 24, 2006
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by prarthana reddy

Hi,
I have passed my SCJP in August ( 19 th ) . I still did not receive my Certifictae from sun .When will i receive it ?
18 years ago
Hi all,
Today i have cleared my scjp exam with 85 % . I would really like to thank javaranch forum and its moderaters for such a wonderful site . This site has contributed much to my success today . Unfortunately i could not get scjp 1.4 K&B book in my place. May be i would have scored much more if i had that book with me . But still i gave it a try through some mock exams..
Thankyou once again one and all..
18 years ago
Hi,
Local variables are always given more preference than global variables . This does'nt mean that the static variable is not visible inside the method . If you remove the local variable, you can get " Am i always visible? " as output.
Thankyou So much shilpa...Thankyou srikanth and wise...i will try my level best
18 years ago
Hi all,
Am going to take scjp 1.4 tomarrow 12.15 EST. I have taken Marcus green tests jiris tests and some other mock tests and scored 85% on an average. I feel i am OK with my preparation.Any suggestions are appreciated...
18 years ago
Because you are throwing an Exception but not handling it properly..
Hi,
Do we need to know about compareTo() and comparator for scjp 1.4 ?
Thankyou for your reply ..i dint notice that
HI,
We know that private methods are not overriden . If we have a method with same name in super class and sub class but declared as private in superclass and public in subclass and if we try to invoke subclass method with a superclass reference, it should give compile error . But the following code is giving me the output:I am saying hello. How is this possible ?
public class Person {
private void say(String s){
System.out.println("I'm saying: " + s);
}
public static void main(String[] args) {
Person p = new Director();
p.say("Hello");
}
}
class Director extends Person {
public void say(String s){
System.out.println("I'm the director");
}
}
Hi,
Where do the reference variables live ? on the stack or on the heap ? I thought they live on heap inside the objects . please clear my doubt
If that is the case then there is a possibility of 1233 answer also..which again makes it unpredictable
Hi,
for the above given question , the answer is given as predictabe and it is 0123..can any one tell me how?
public class Test {

static int i = 0;

public static void main(String[] args) {

Thread t = new Thread(new Runnable(){

public void run(){
for(int j = 0; j < 3; j++)
System.out.println(++i);
}
});

t.start();
System.out.println(i);
}
}

Is the output ( given as 0123) predictable and always the same ? If so how ?
public class Test
{
public static void main(String args[])
{
int i = 1;

switch(i++)
{
case 0:

System.out.print(i + " "); //1
break; //2
System.out.print(i + " "); //3

case 1: //4

System.out.print(i + " ");
default: //5
}
}
}

I dont understand why print statement in case 1 is unreachable ..
Are unicode literals represented in hexadecimal notation?
public class Test
{

public static void main(String args[])
{
System.out.println('\u033');
}

}
Why is the above code giving error ? What is the range of unicode literals ?