- iPhone topik
- A Huawei február 26-án globálisan is bemutatja a Mate 80 Prót
- Fotók, videók mobillal
- 10 egyszerű trükk Samsung telefonokhoz
- Cáfolja a Realme, hogy leépülne
- One mobilszolgáltatások
- Okosóra és okoskiegészítő topik
- Android szakmai topik
- A Dreame három okostelefont mutatott meg Lengyelországban
- Nem hajlítható hajlíthatóval készül a Huawei
Új hozzászólás Aktív témák
-
pvt.peter
őstag
elég sokféleképpen meglehet oldani
Obj.java
package bikeshop;
public class Obj {
private final int ordertime;
private final boolean ordertype;
private int price;
public Obj(int ordertime, boolean ordertype) {
this.ordertime = ordertime;
this.ordertype = ordertype;
this.price = (this.ordertime >= 1 && this.ordertime <= 5) ? 10 : 30;
this.price += this.ordertype ? 10 : 5;
}
public int getPrice() {
return this.price;
}
}Main.java
package bikeshop;
public class Main {
public static void main(String[] args) {
Obj obj = new Obj(5, false);
System.out.println("Price: " + obj.getPrice());
}
}
Új hozzászólás Aktív témák
A topicot kiemeltem. Valaki nem akar egy nyitó hsz-t írni?:))
- Fanatec Clubsport V3 pedál + Brake performance kit + Damper kit
- ASUS VIVOBOOK S14 FLIP - 14"WUXGA Érintő - Ryzen 5 5600H - 16GB - 512GB - Win11 - MAGYAR - Garancia
- HIBÁS - Alienware 17 R5 i9-8950HK GTX1080OC 8GB
- Asztali PC , i7 12700KF , RTX 3080 , 32GB DDR5 , 1TB NVME
- Gigabyte 5080 gaming oc , 28 h gari
- ÁRGARANCIA!Épített KomPhone Ryzen 5 7500F 32/64GB RAM RTX 5070 12GB GAMER PC termékbeszámítással
- HIBÁTLAN iPhone 13 128GB Pink -1 ÉV GARANCIA - Kártyafüggetlen, MS4243, 100% Akksi
- ÁRGARANCIA!Épített KomPhone i5 14400F 32/64GB RAM RTX 5060 Ti 8GB GAMER PC termékbeszámítással
- szinteÚJ Lenovo ThinkPad L14 Gen5 i7 155U 16GB 1TB FHD+
- Dell Precision 7550 i7-10850H 32GB 512GB Nvidia RTX5000 6GB 1 év garancia
Állásajánlatok
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest
Cég: Laptopműhely Bt.
Város: Budapest


