ERJAN
ERJAN

Reputation: 24500

How to compare two identical methods in eclipse?

I'm doing android app from a book, for some reason the exact method source code I wrote myself does not work as expected and I am trying to debug it.

I have two exact chunks of code, my method and the sample method.
How to compare them in eclipse?

Upvotes: 0

Views: 257

Answers (3)

mkazma
mkazma

Reputation: 582

use beyond compare, it's a great tool for comparing classes, and methods! download beyond compare

Upvotes: 0

fkarg
fkarg

Reputation: 198

Did I get right that neither of the sample method nor your method do what they should? Then there are two possibilities why the code won't do what it should:

  1. The book is obsolet
  2. You made something wrong

either way, google for your specific problem, maybe someone else has encountered it as well and already solved it.

for your Question: already answered in another comment

Upvotes: 0

tilois
tilois

Reputation: 682

Select both files by clicking the first, then while holding CTRL click on the second. Now both of them got selected.

Now click one of them (doesn't matter which one) with the right mouse button. From the appearing context menu choose:

  • Compare
    • Each other

Now you can do a text compare.

Upvotes: 1

Related Questions