Win a copy of Spring Boot in Practice this week in the Spring forum!

natarajan raman

Greenhorn
+ Follow
since Apr 10, 2004
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 natarajan raman

Hi Sura,

Yeah String is a class........And about the other question why don't you try and write a small code and get it run....

String n;
String x = new String("");

Such codes will help you.....Any small doubts can be clarified by writing programs....Many of our peers have suggested this. This will help you to learn more definitely.

Still if you face problems then come up with post.....okay....Have good time with Strings....
hi prerna,

Cool .....You have given your self good time for the exam....you should be able to do it.......Javaranch is the nice place to start with....

www.jchq.net ....you can find Marcus green's excellent tutorials.......

http://www.dpo.uab.edu/~asm/mock.html has the link for all mock exams....

also please check the SCJP tipline (by Corey)link provided in the forum.....Dan's mock is also great.........

www.whizlabs.com has good tutorials.......As far as books are concerned....Kathy Sierra and Bates...is the best......


What I feel about taking the exam is ....it's all about interest....Experience may help sorry will definitely help.....But if you have the will to win I am sure you can do.......As you go along you will get to know lot many intricacies of JAVA language which even 1+ years exp.in Java may not know.....

All the best for the exam.......BTW I am yet to take my exam and I am preparing for it.......Hope you will have great time with Java and our home javaranch.com as fellow ranchers and I do......

(Edited: Barry's TipLine -> Corey's TipLine)

[ October 01, 2004: Message edited by: Barry Gaunt ]
Yeah!!!Chandra I too agree with you.

Thanks.
Hi PNS,

I think Marc's explanation is more clear...Please see the JLS reference given.

public int j=1;

public int i = m();

The variable initializer for i uses the class method m() to access the value of the variable j and since j has been initialized by its variable initializer well before i, it prints 1.

In the first case ,
public int i = m();
public int j=1;

The variable initializer for i uses the class method m() to access the value of the variable j before j has been initialized by its variable initializer, at which point it still has its default value.


Hope this helps. Thanks a lot Marc!!!
[ September 30, 2004: Message edited by: natarajan raman ]
Great Score!!!Congrats!!!
17 years ago
Thanks a lot!!!That's really helpful Inuka.....
Hi Peter,

This prints "int" because the when t.c(ch) is called it looks for the function with argument as Character.

char is essentially the only unsigned integral type. So when it calls invokes the first function with integer argument.

Hope this helps.
That's a real good one Tom....Very nice explanation.......Thanks a lot....
Hearty congrats Sachin......Have great time....
17 years ago
That's a great score......Congrats.....
17 years ago
That's really a great explanation from all you people.

Tybon has given me a clear idea how the array is looked at.

Julian Thanx a lot ......Your explanation was also good.

INXS( I just wonder what your real name is!!!) I just can't believe

anyone can explain this as lucid as you did. Great!. you never confused me.

It's just because of you I could grasp what other two explained easily.

Thank you all.

It's just this great response which you people show makes many like me to

prepare well.

Thank you all again.
Dear Tybon,

Quote
_______________________________________________
Given byte b2[][][][] = new byte [2][3][1][2];
the following are true:

b2 is a 4-dimensional array
b2[0] is a 3-dimensional array//isn't that a 1-dimensional array?
b2[0][0] is a 2-dimensional array
b2[0][0][0] is a 1-dimensional array//isn't this a 3-D array?
b2[0][0][0][0] is a byte
_________________________________________________________

Please help.....will be grateful if you do....

Thanks.
Hi all,

I have a doubt with assigning values to the array variables.
In K&B self test page 49 question 12.
It asks for the line of code to be inserted and still allow the code to compile
____________________________________________________________________
class{
main here{
//code
byte [] [] big = new byte [7][7];
byte [][] b= new byte[2][1];
byte b3=5;
byte b2[][][][]=new byte [2][3][1][2];
//here we need to insert any of the line of code below
}
}
_______________________________________________________________________
they ask for the code that can be inserted
a) b2[0][2]=b; b) b[0][0]=b3; c) b2[1][1][0]=b[0][0]; d) b2[1][2][0]=b;
d) b2[0][1][0][0] = b[0][0]; f) b2[0][1] = big;

The answers are a,b,e and f. The explanation states that "If an array is declared as a two dimensional array, you can't assign a one dimensional array to a one-dimesional array reference"

What's that? If i declare an array as two dimesional what does the one dimensional array got to do with that?

When choice a assigns a 2-D array to 4-d it works fine...then why not option c which assigns 2-D to 3-D.?

I am really confused with array assignment. I tried to search earlier posts too. please help me out. I am losing a lot because of not understanding this concept in other areas too.

Can any of you help me please....Else please atleast specify links to earlier posts for reference.

Thanks a lot in advance.
[ August 08, 2004: Message edited by: natarajan raman ]
hi,

I don't think so they are part of exam objective......can any of those SCJP's throw light on this....

please and thanks in advance....
Congrats!!!

And thanks a lot for the advise.

Makes me feel a lot comfortable.

Have great time!
18 years ago