ketki kalkar

Ranch Hand
+ Follow
since May 09, 2007
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 ketki kalkar

hi,
I gave the exam on thursday and I scored 27 correct.I failed miserably.I dont know what went wrong since I have been working hard for 3 months.I solved almost all mock exams on various websites and scored 50 to 60% on mock exams and also referred 2 books.Still i failed.I dont know whether I should go for a retake.I am disoriented and lost confidence.Please guide me.

Thankyou
hi all,

I am planning to give sun exam this week.But I am still confused with the thread questions and casting(unary and binary promotion).Please elaborate on this queries with a reply.

Thankyou

Originally posted by Tina Jain:
I am preparing for Sun Certified Programmer for the Java 2 Platform, Standard Edition 5.0 Upgrade Exam (CX-310-056), I am already a SCJP for 1.4.

Which book is best for me.

Head First Java, 2nd Edition
Or
SCJP Sun Certified Programmer for Java 5 Study Guide (Exam 310-055)

Any help will be greatly helpful.
Thanks for your help in advance.



hi,
I am also giving the SCJP 1.4 exam on this thursday..Is it very tough as compared to the mock exams oin sites like javabeat,jdiscuss,whizlabs etc.?What score is sufficient in mock exam to pass the actual exam?Please guide me with a reply.
Thankyou
hi all,

I have planned to give sun exam next week.I am confused a bit because of the mock scores. I score 70 to 75% with some easy exams like Green exam,javacertificate,4test etc. But I score 50 to 60% with some tough exam like Bill brogden,whizlabs etc.Should I appear for the exam? Or should I work more onthe exam? I have been preparing java since 2 months with no prior experience in java.What is the access level for actual exam?IS it easy than those mock exams?Please guide.

Thanyou
hi,
Following are queries from mock exam on go4java.20msite.
Which one of the following statements will give you an Exception when
placed at line no.10?Select one correct answer.

1 class AA{}
2 class BB extends AA{}
3 class casting
4 {
5 public static void main(String arg[])
6 {
7 AA a=new AA();
8 BB b=new BB();
9 AA c=new BB();
10 //Here
11 }
11 }

1. b = (BB) a;
2. a = b ;
3. b = (BB) c;
4. c = b;

class Q20
2 {
3 public static void main(String arg[])
4 {
5 Q20 e=null;
6 System.out.println(e.equals(null));
7 Q20 e1;
8 System.out.println(e1.equals(null));
9 }
10 }

1. Error at line no. 6
2. Excepetion at line no. 6
3. Error at line no. 8
4. Excepetion at line no. 8

What will be the result of compiling and running the given program?
Select one correct answer.
1 class initialize
2 {
3 int y=0;
4 {
5 y=1;
6 }
7 initialize()
8 {
9 this(10);
10 y=3;
11 }
12 initialize(int s)
13 {
14 y=2;
15 }
16 public static void main(String arg[])
17 {
18 initialize i=new initialize();
19 System.out.println(i.y);
20 }
21 }


1. Compile time error
2 Program compiles correctly and prints 1 when executed.
3. Program compiles correctly and prints 2 when executed.
4. Program compiles correctly and prints 3 when executed.
5. Program compiles correctly and prints 0 when executed.

What is the answer?
Thankyou
hi,
Following is a piece of code from green exam no 2.Please explain?

Given the following code what will be the output?

class ValHold{
public int i = 10;
}
public class ObParm{public static void main(String argv[]){
ObParm o = new ObParm();
o.amethod();
}
public void amethod(){
int i = 99;
ValHold v = new ValHold();
v.i=30;
another(v,i);
System.out.print( v.i );
}//End of amethod
public void another(ValHold v, int i){
i=0;
v.i = 20;
ValHold vh = new ValHold();
v = vh;
System.out.print(v.i);
System.out.print(i); }//End of another
}

1) 10030
2) 20030
3) 209930
4) 10020
answer is 4).
hi,

I have been preparing for java certification 1.4. Accordingly I am doing mock exams on various sites.I get a score of 50 to 60%. Is this sufficient for me to clear Sun exam? If not how should I prepare for the exam? Are these mock exams on sites like jdiscuss and javabeat or some other sites equivalent in difficulty level to the real exam?

Thankyou
[ June 26, 2007: Message edited by: ketki kalkar ]
hi,
Is this valid?
Integer iwSize[] = new Integer[]{new Integer(1)}; Some mock exam says its valid while some say it is not.

What is forward referencing? I couldnt find it in Mughals book.

Is default modifier permitted for interface decalaration and memebers declared inside it? what modifiers are allowed?

Also can a dead thread be restarted?

Thankyou
hi all,
Following is a piece of code from javabeat mock exam 14.

class TechnoSample {
public static void main (String args[]) {
int i = 0;
int j = 0;
label1: while (i++<5) {
label2:
for(; {
label3:
do {
System.out.print(i + j);
switch (i+j++) {
case 0: continue label3;
case 1: continue label2;
case 2: continue label1;
case 3: break;
case 4: break label3;
case 5: break label2;
case 6: break label1;
default: break label1; } }
while (++j<5); } } }}

What is the result of attempting to compile and run the above program?

(1) Prints: 12457
(2) Prints: 02357
(3) Prints: 02356
(4) Prints: 1357
(5) Prints: 1356
(6) Runtime Exception
(7) Compiler Error
(8) None of the Above

Answer is 1. I often get wrong answers with such iterattion questions.Please anyone tell me how to apply the logic behind such type of questions?

[ June 19, 2007: Message edited by: ketki kalkar ]
[ June 19, 2007: Message edited by: ketki kalkar ]
hi,
following is a piece of code from javabeat mock exam 12.
if("String".trim() == "String".trim())
System.out.println("Equal");
else
System.out.println("Not Equal");
answer is it prints NOt equal.

* if(" String ".trim() == "String")
System.out.println("Equal");
else
System.out.println("Not Equal");
answer is Equal.


* if("String".replace('g','G') == "String".replace('g','G'))
System.out.println("Equal");
else
System.out.println("Not Equal");

answer is Not equal.
I am confused.Please explain.
hi,
I have been solving mock exams on javabeat site and facing with the understanding part.Here is one ,
What happens when the following code gets executed:
class TechnoSample {
public static void main(String[] args) {
double d1 = 1.0;
double d2 = 0.0;
byte b =1;
d1 = d1/d2;
b = (byte) d1;
System.out.print(b);
}}

(1) It results in the throwing of an ArithmeticExcepiton
(2) It results in the throwing of a DivedeByZeroException
(3) It displays the value 1.5
(4) It displays the value ���1
answer is 1.Explain?
thankyou
hi,
Following is a query from javabeat mock exam 11.
What will be the result of attempting to compile and run the following program?
public class TestClass {
public static void main(String args[ ] ) {
A o1 = new C( ); 1.
B o2 = (B) o1; 2.
System.out.println(o1.m1( ) );
System.out.println(o2.i ); }}
class A{ int i = 10;
int m1( ) { return i; }}
class B extends A{ int i = 20;
int m1() {
return i; }}
class C extends B {
int i = 30;
int m1() {
return i;
}}

Select 1 correct option
(1) The progarm will fail to compile
(2) Class cast exception at runtime
(3) It will print 30, 20
(4) It will print 30, 30
(5) It will print 20, 20
answer is 3.

The method to be used depends on class of the object.Here it is an instance method so should it refer to class C for the first part of answer?
Please explain.
hi,
Following are some questions from javabeat site,mock exam number 10.
Given:
1. public class TeSet {
2. public static void main(String args[]) {
3. int m = 2;
4. int p = 1;
5. int t = 0;
6. for(;p < 5;p++) {
7. if(t++ > m) {
8. m = p + t;
9. }
10. }
11. System.out.println("t equals " + t);
12. }
13. }

What is the resulting value of t?

(1) 2
(2) 4
(3) 6
(4) 7
The answer is(2).

* Given the following code, what will be the output?
class Value{ public int i = 15;} //Value
public class Test{
public static void main(String argv[]){
Test t = new Test();
t.first(); }
public void first() {
int i = 5;
Value v = new Value();
v.i = 25;
second(v, i);
System.out.println(v.i); }
public void second(Value v, int i) {
i = 0;
v.i = 20;
Value val = new Value();
v = val;
System.out.println(v.i + " " + i);
}} // Test

(1) 15 0 20

(2) 15 0 15

(3) 20 0 20

(4) 0 15 20
answer is 1.
Please explain.
hi,
Which of the following prints "Equal"

A) int a = 10; float f = 10;
if ( a = = f) { System.out.println("Equal");}
B) Integer i = new Integer(10);
Double d = new Double(10);
if ( i = =d) { System.out.println("Equal");}
C) Integer a = new Integer(10);
int b = 10;
if ( a = = b) { System.out.println("Equal");}
D) String a = new String("10");
String b = new String("10");
if ( a = = b) { System.out.println("Equal");}

answer is A.Please explain.
hi,
What is the output of the following code?

public class TestLocal {
public static void main(String args[]) {
String s[] = new String[6];
System.out.print(s[6]);
}
}

A) A null is printed
B) Compile time error
C) Exception is thrown
D) null followed by 0 is printed on the screen
answer is D.

What is the result of the following code?

public class MyTest {
int x = 30;
public static void main(String args[]) {
int x = 20;
MyTest ta = new MyTest();
ta.Method(x);
System.out.println("The x value is " + x);
}
void Method(int y){
int x = y * y;
}
}

A) The x value is 20.
B) The x value is 30.
C) The x value is 400.
D) The x value is 600.

answer is A.