AVNI R

Greenhorn
+ Follow
since Oct 30, 2000
Merit badge: grant badges
For More
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 AVNI R

Congratulations sunita........ Those tips were really helpful. I agree with yu that compiling the codes yu get to learn a lot......
Its celebration time for yu.......
Good luck and congrats once again.
I agree with yu Gibson, nothing is difficult in life... Belive me I had been reading the moughal book twice and still have those silly doubts. But yu really feel confident when u are able to answer the questions on the discussions.....
But try compiling small programs and yu would have a lot of doubts which yu should clear and get it straight....... Dont leave an inch of it also unanswered.....
My prof. often used to say at engg. "The easy way yu get in the easy way yu r out" It really applies to java...
Keep going and good luck.......
AVNI.
(SCJP- SOMETIME IN NOVEMBER 2000)
Thanks Ajit......
I agree with it, and understand that all primitive datatypes can be compared using == and object references should be compared using equals.
I have one more question.......Where does string belong to. I understand that it is a literal(constant), and we also have a string class.. But from the book of moughal it says that yu can compare a string literal to a string object but not with ==
Here is an example

Ajith. I have two doubts here.......
1. Where does a literal(any literal-int,boolean,string etc)belong to.. Is it belonging to primitive datatypes? If yes then why do we have literals in the first place.... Can't we do without it..
2. In this example why cant we compare a string literal to an object reference in (1)? Why is it giving false... and why it is giving true at (2)...........
Mysterious strings.........

AVNI
congrats........ well done.......
Yu surely deserve a job in SUN MICROSYSTEMS........
GOOD LUCK.....
AVNI
23 years ago
hi everybody,
I have a silly question, when do we use == and equals. Its kind of confusing at times. I am confused that if yu want to compare members(methods and variables), which one yu use. and for object reference which one to use.......... I am new to java, I dont know if I sound too bad....
Thanks in advance.......
avni