Skip to content
Snippets Groups Projects
Commit c74197e6 authored by Daniela Degenhardt's avatar Daniela Degenhardt
Browse files

Update Murtoluku.java

parent a02999d7
Branches
No related tags found
No related merge requests found
......@@ -26,17 +26,17 @@ public class Murtoluku implements Comparable<Murtoluku> {
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
public boolean equals(Object kohde) {
if (this == kohde) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
if (kohde == null || getClass() != kohde.getClass()) {
return false;
}
Murtoluku that = (Murtoluku) obj;
return this.osoittaja * that.nimittaja == that.osoittaja * this.nimittaja;
Murtoluku toinen = (Murtoluku) kohde;
return this.osoittaja * toinen.nimittaja == toinen.osoittaja * this.nimittaja;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment