• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

passed 1.4 with 95%

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Author & Gold Digger
Posts: 7617
6
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good job Vijay
 
Ranch Hand
Posts: 1865
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Congratulations Vijay!
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Vijay,
Excellent score. Congratulations!
Perseus
 
Vijay Gorla
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
the answer is AAB?
 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Vijay.
Is it a, b, and d?
 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 513
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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");}
}
 
reply
    Bookmark Topic Watch Topic
  • New Topic