All Forums  Certification Study Forums   Sun Certified Java Programmer Exam  (Refresh)
[Moderated by :- Ashik Uzzaman, Ghulam Nadeem]

Only Registered Users can post to this forum.   Notification service is available for registered users.   Search

Number of users logged in : 112        You are logged in as: UnRegistered        Login         View Private Messages        View Promotions
New Replies Topic (Last Reply At) Started By Replies
New Replies     Question com.enthuware.ets.scjp.v6.2.186  (Nov 23 05:27:02, '09)
Hi,
I hope that somebody can clear this up for me.
The question asks which statements describe guaranteed behaviour of the garbage collection and finalization mechanisms.

I know that the finalize method will never be called more than once on an object but isn't the first statement also correct in that objects will not be destroyed as long as they have references pointing to them.  

Thanks,
Clare
  Clare Kew   0  
New Replies     About Question com.enthuware.ets.scjp.v6.2.325  (Nov 21 21:45:35, '09)
Hi guys,

I think there is a mistake in this question.. It gives the answer as being a set of boolean values, however the statement

testPackage.Other

in main makes me think that the answer should be None of the Above (since it is a compiler error). Please help thanks.
  Gianluca Valentino   1  
New Replies     com.enthuware.ets.scjp.v6.2.741 ERROR  (Nov 21 21:42:05, '09)
Method static int val() must have return statement otherwise it would be compiler error No
scjp6 practice!
  Ghettotech Edi   2  
New Replies     com.enthuware.ets.scjp.v6.2.534  (Nov 21 21:39:20, '09)
How many objects will be eligible for garbage collection at the end of this method?


public float method(float pf)
{
float f = 1.23f;
float o = f = pf;
f = null;
o = null;
return 0;
}

We can't assaign null-value to primitive types!
scjp6 practice!
  Ghettotech Edi   2  
New Replies     com.enthuware.ets.scjp.v6.2.489 another BUG  (Nov 21 21:35:05, '09)
Select the correct statement regarding the following code:

public void m1()
{
    int i;
    ...
    try
    {
        assert i == 20;
    }
    catch(Exception e)
    {
        i = 20;
    }
    System.out.println(i);
    ...
}

i local var, not initialized. Compilation error
scjp6 practice!
  Ghettotech Edi   1  
New Replies     Flow Control & Exception Handling (952739437080)  (Nov 17 10:46:17, '09)
View Question

the exact answer if you pass option c should be ' param1 param2' as there is a " " added in the print statement.
  Vijay Sethumadavan   3  
New Replies     Please explain this one:   (Sep 25 05:27:12, '09)
class Test
{
   public static void main(String[ ] args)
   {
      int[] a = { 1, 2, 3, 4 };
      int[] b = { 2, 3, 1, 0 };
      System.out.println( a [ (a = b)[3] ] );
   }
}

if I change the 3 in the expression in the print line:

if I enter 0 it prints 3
if i enter 1 it prints 4
ir I enter 2 it prints 2
if I enter 3 it prints 1

how is it arriving at the answer?
Thanks
  Joe Tt   3