whats the difference between == and .equal ?
Answer Posted / james rajesh
One database tale contain id and name...mostly id's are in int and name's are in String...if u want to compare with id and one number means u use ==
like, if(id==1)
if u want to compare name means u use .equals
like, if(name.equals("Bangalore"))
So point of view,
== used to compare integer
.equals used to compare String
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Explain aggregation in java?
Is this valid in java ? Can we instantiate interface in java?
What is the name of the java compiler?
What is this keyword used for?
What is java lang string?
What do you mean by default constructor in java?
What are byte codes?
What are voids?
What is the purpose of the file class in java programming?
What are the four corner stones of oop?
how to run ecllipse with jettyserver for windows environment using batch file
How do you convert an int to a string in java?
Difference between final and effectively final ?
What is the parse method in java?
Why string is not thread safe?