whats the difference between == and .equal ?

Answer Posted / guest

== compares the objects but .equals compare the value of the
objects.

Is This Answer Correct ?    18 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain about the security aspect of java?

575


How many bits is a string?

525


Why do we use string?

581


Can we use string in the switch case?

577


What is the difference between preemptive scheduling and time slicing?

593






What is parse method?

543


What is the difference between abstract classes and interfaces?

515


What is the purpose of assert keyword used in jdk1.4.x?

567


Differentiate between a constructor and a method? Can we mark constructors final?

678


How will you calculate the depth of a binary tree if the tree contains 15 nodes?

601


What is meant by 'Class access modifiers'?

554


Find the value of a specified element of the array arr[i] where 0 <= i <= n-1

543


What is the size of boolean variable?

577


What is the difference between heap and stack memory?

548


What is the r character?

588