Win a copy of Practice Tests for OCP Java 17 Certification Exam (1Z0-829) this week in the OCPJP forum!

Amit Kumar Ch

Greenhorn
+ Follow
since Jul 19, 2005
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 Amit Kumar Ch

Congrats Amit.
Great score
16 years ago
Congrats Anjali..thats a great score.
16 years ago
Thanks Guys...that made it clear.
Can someone please help me out with this peice of code from Dan Chisholms mock test.

class JMM110 {
public static void main (String[] args) {
int j = 0;
do for (int i = 0; i++ < 2; )
System.out.print(i);
while (j++ < 2);
}}

The result of compiling and running the code is

121212.

How are we supposed to interpret the do-while and for loops?
Are both the for loop and print statement nested inside the do-while loop or the do-while applies only to the for statement?
nice score.
congrats
16 years ago
Congrats Srinath and thanks for sharing your experience.
16 years ago
running the code gives an output of

hellohere.

since only the statement

s += "here"; has been assigned to a reference variable, the string 'hellohere' is printed while the result of all the other
operations are lost(not reffered to by any variable).
Hi,

Can someone please help me out with this peice of code..

class Red {
public int a;
public static int b;

public static void main (String[] in)
{
Red r1 = new Red(), r2 = new Red(); //line 1
r1.a++; r1.b++; //line 2
System.out.print(r1.a+", "+r1.b+", "+r2.a+", "+r2.b); //line 3
}}

compiling this program and running it gives a result of
1 1 0 1.
my question is, in the line marked as line 2, how can we access the instance variable 'a' from a static context?
'b' should be fine since it is declared as static.

thanks in advance.

-Amit kumar.
Hi Sameer,

1. Sun needs more certified professional as they are targetting future market.
2. The exam is made easy as never before.
3. Exam objective + Good guidelines from any certification books + few mocks and trying basic codes gives you enough expossure to attempt the level of questions asked.
4. You don't need to be very hardworking or great programmer to be sun certified thought it makes the process easy.


Does this mean that the standard of the exam has come down lately?will the certification carry the same weightage on our resume as it used to?
16 years ago
Hi Kedar
Congrats.
can you tell me if the whizlabs exams are of the same difficulty level of the actaul exam?
thanks
16 years ago
Hi,
The following peice of code is from the K & B book.

1 final int a=1;
2 final int b;
3 b=2;
4 int x=0;
5 switch(x)
6 {
7 case a: //This line compiles fine.
8 case b: // This line gives a compiler error.


can anyone please tell me why line 8 gives an error?
Hi

I am planning to take my SCJP 1.4.
Can someone tell me once I buy the exam voucher from Sun, how long is it valid for?
Can we buy the exam voucher on phone?

Thanks in advance.

Amit
congrats vin
great going
16 years ago
Thanks a lot Peter.
16 years ago
Congrats Peter.. well done

I am a newcomer to this place as well as java.
i am currently reading 'Head First Java' - K & B.

Does one need to have real time work exp on Java to crack the exam?
coz i dont have any working experience in java
can anyone recommend me a good stategy to pass the SCJP 1.4?
16 years ago