Supriya

Greenhorn
+ Follow
since Oct 27, 2000
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 Supriya

Hello folks,
Y'day i passed the exam with a score of 83%.
I have been visiting this site frequently .Though i didn't participate much i found it very useful.it gave me a proper perspective of scjp exam.
my preperation was for 1.5 months.i read RHE twice and did mocks on Maha's page.
i knew i did'nt have enough preperation for threads and did badly in the exam too.there were some 3 code questions.one was on deadlock(i guess).RHE is not sufficient for threads.u need to write code and practise.
I/O was basic.only about constructors.
time was more than sufficient.i had 35 minutes left to review my answers!
thanks to Maha Anna,Java Ranch,my husband for his encouragemnt and support,my parents and sis.
will keep visiting this site for more info on Java.its absolutely GREAT!
BYE
Supriya
23 years ago
Doubt on a gc question from Applied Reasoning test:
"Java's garbage collector will be invoked by executing System.gc()"
i think this is true.
but the answer says "it may or may not invoke".can anyone clarify.
Hi Harpal,
hoping to see u'r post syaing u passed the exam.i am getting the same score almost in the mocks u listed but taking the test on 13th anyway.
all the best,
Supriya
Hi Harpal,
hoping to see u'r post syaing u passed the exam.i am getting the same score almost in the mocks u listed but taking the test on 13th anyway.
all the best,
Supriya
thanks Aruna.
i got the point.i tested it with the following code:
public class Base{

public static void main(String args[]) {
Base b= new sub();
b.amethod();
}

private void amethod(){
System.out.println("Hey!i am base");
}
}
class sub extends Base{

private void amethod(){
System.out.println("Hey! i am sub");
}
}
It outputs:Hey!i am base
whereas if the amethod is not declared private the out put was:
Hey! i am sub
now i am clear
can anyone explain this:
private methods can be overrided if superclass is non-abstract.
private methods cannot be overriden if superclass is abstract.
why is it so?
Hi SOLAIAPPAN!
congrats!!
i am taking the exam on 14th.could u suggest few good sites for mock exams to assess myself.my id :<supriyamadamanchi@hotmail.com>
thanks in advance
Thanks Harpal and Midrisi,
I was confused abt. how B's doSomething() method is invoked from within A's constructor.overlooked that its invoked thru an object which is an instance of B class.
thanks guys for clearing the confusion.
Supriya
this question is from mock exam #36 on Maha's site:
Question 13
Object Construction II
Determine the result of attempting to compile and run the following code:
class A {
public int Avar;
public A() {
System.out.println("AAA");
doSomething();
}
public void doSomething() {
Avar = 1111;
System.out.println("A.doSomething()");
}
}
public class B extends A {
public int Bvar = 2222;
public B() {
System.out.println("BBB");
doSomething();
System.out.println("Avar=" + Avar);
}
public void doSomething() {
System.out.println("Bvar=" + Bvar);
}
public static void main(String[] args) {
new B();
}
}
the explanation says that when the doSomething() method is invoked from within A's constructor, it is actually B's version of doSomething() that is being invoked. How is this possible?