Új hozzászólás Aktív témák
-
sztikac
őstag
Ha már MOOC... Van ez a kód:
public boolean equals(Object compared) {
// if the variables are located in the same position, they are equal
if (this == compared) {
return true;
}
// if the compared object is not of type Person, the objects are not equal
if (!(compared instanceof Person)) {
return false;
}
// convert the object into a Person object
Person comparedPerson = (Person) compared;
// if the values of the object variables are equal, the objects are equal
if (this.name.equals(comparedPerson.name) &&
this.age == comparedPerson.age &&
this.weight == comparedPerson.weight &&
this.height == comparedPerson.height) {
return true;
}
// otherwise the objects are not equal
return false;
}Itt nem igazán értem, hogy a type cast-ra (
Person comparedPerson = (Person) compared;) mi szükség van, hiszen a metódus már megkapja a compared objektumot
Új hozzászólás Aktív témák
A topicot kiemeltem. Valaki nem akar egy nyitó hsz-t írni?:))
- Synology NAS
- Fortnite - Battle Royale & Save the World (PC, XO, PS4, Switch, Mobil)
- Bejelentették a Genigods: Nezha-t, a kínai mitológiára épülő akció-RPG-t
- Bambu Lab 3D nyomtatók
- PayPal
- Robotporszívók
- Hyundai, Kia topik
- Autóhifi
- Vezetékes FEJhallgatók
- Elektromos autók - motorok
- További aktív témák...
- LG 45GX950A-B - 45" Ívelt OLED evo / 5K WUHD / 165Hz-330Hz / NVIDIA G-Sync / FreeSync / DP 2.1
- CSX 2x2GB (4GB) DDR2 800 MHz kit
- KÉSZLETKISÖPRÉSI KARÁCSONYI ULTRAAKCIÓ! - MacBook Air M4 16GB 512GB Garancia!
- ÁRGARANCIA!Épített KomPhone Ryzen 7 9800X3D 32/64GB RAM RTX 5070 12GB GAMER PC termékbeszámítással
- BESZÁMÍTÁS! Sapphire B650M R7 8700F 32GB DDR5 1TB SSD RX 9070 XT 16GB CM MasterBox 5 fehér 750W
Állásajánlatok
Cég: Central PC számítógép és laptop szerviz - Pécs
Város: Pécs
Cég: Laptopműhely Bt.
Város: Budapest


