• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

passed 1.4 with 95%

 
Vijay Gorla
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
got 58/61 right, one question on garbage collection was a bit tricky, and http://java.sun.com/j2se/1.4/docs/guide/lang/assert.html was clearly enough for all questions on assertions ( 2 or 3, not sure).
and that's all there to report guys,
mock exams list on javaranch was really helpful.
Cheers!!!
Vijay Gorla
http://www.vijaygorla.com
 
Valentin Crettaz
Gold Digger
Sheriff
Posts: 7610
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good job Vijay
 
Dan Chisholm
Ranch Hand
Posts: 1865
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congratulations Vijay!
 
Anna Swartz
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congratulations Vijay!
I am going to take my exam next Monday. Would you be able to explain what was tricky part on the garbage collection question? Without revealing the question of course. I keep seeing people mentioning that questions on g.c. are tricky, but have not seen any tricky questions on g.c. in the mock exams. Would you please shed some light on this subject? I will really appreciate it, I am sure, many others will too.
 
Perseus Alcides
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Vijay,
Excellent score. Congratulations!
Perseus
 
Vijay Gorla
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anna,
These questions that I've prepared might help.
They are not the actual questions.

[ October 17, 2002: Message edited by: Vijay Gorla ]
 
Patrick Cheung
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the answer is AAB?
 
monz
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
congrats
you have done a marvelous job
and thanx for the code
can u plz provide some guidence or study stuff
as i m planning for my SCJP
thanx
regards
 
Anna Swartz
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Vijay.
Is it a, b, and d?
 
anushree ari
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi vijay,
thx for the code,
according my knowledge the ans is a,c,d,
i want to know the correct answer,
anyone can correct me,
thx
 
Ruff Young
Ranch Hand
Posts: 513
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congratulations Vijay!!
Thanks for the code,
Could you tell me answer?
 
Vijay Gorla
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. D
It's only the local reference variable of the method (not the private variable) that is set to null on line 5, At this stage there will be two variables referring the same object, and one is set to null, that doesn't make the object eligible for garbage collection.
B and C are just method calls.
2. A
Not sure, though,
Foo's implementation is unspecified, it might have passed the bar reference to some other object.
3. D
(short) casting applied to (a + b) only, so the expression becomes short/long, and the result would be long.
 
Arthur Clarke
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Congratulations Vijay!
You wrote :
2. A
Not sure, though,
Foo's implementation is unspecified, it might have passed the bar reference to some other object.
Pleas try this. I think, it will make you sure:
----------------------------------------
public class Test {
public static void main(String args[]) {
Foo foo = new Foo();
Bar bar = new Bar();
// foo.somemethod(bar); //please remove comments
bar = null;
foo = null;
System.gc();
System.out.println(Foo.b);
}
}
class Foo{
static Bar b;
public void somemethod(Bar b){
this.b = b;
}
}
class Bar{
public void finalize(){System.out.println("finalize");}
}
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic