- Máris kezeli a nem induló Socket AM5-ös alaplapjainak ügyét az ASRock
- A Sony szerint a PlayStation 5 konzolokat még nem érinti a memóriahiány
- A beérkező kérésekre figyelve frissítette North szériáját a Fractal
- Ez a pehelysúlyú egér talán még egy jeti kezébe is passzol
- Noctua-jubileum: 20 év, félmillió ingyenes rögzítőkészlet
- Fejhallgató erősítő és DAC topik
- Milyen TV-t vegyek?
- AMD Ryzen 9 / 7 / 5 7***(X) "Zen 4" (AM5)
- NVIDIA GeForce RTX 5080 / 5090 (GB203 / 202)
- OLED TV topic
- Mini PC
- Milyen asztali (teljes vagy fél-) gépet vegyek?
- OLED monitor topic
- Kormányok / autós szimulátorok topikja
- Intel Core i5 / i7 / i9 "Alder Lake-Raptor Lake/Refresh" (LGA1700)
Új hozzászólás Aktív témák
-
Davs
tag
PetCreator:
//: typeinfo/pets/PetCreator.java
// Creates random sequences of Pets.
package typeinfo.pets;
406
Thinking in Java
Bruce Eckel
import java.util.*;
public abstract class PetCreator {
private Random rand = new Random(47);
// The List of the different types of Pet to create:
public abstract List<Class<? extends Pet>> types();
public Pet randomPet() { // Create one random Pet
int n = rand.nextInt(types().size());
try {
return types().get(n).newInstance();
} catch(InstantiationException e) {
throw new RuntimeException(e);
} catch(IllegalAccessException e) {
throw new RuntimeException(e);
}
}
public Pet[] createArray(int size) {
Pet[] result = new Pet[size];
for(int i = 0; i < size; i++)
result[i] = randomPet();
return result;
}
public ArrayList<Pet> arrayList(int size) {
ArrayList<Pet> result = new ArrayList<Pet>();
Collections.addAll(result, createArray(size));
return result;
}
} ///:~ForNameCreator:
//: typeinfo/pets/ForNameCreator.java
package typeinfo.pets;
import java.util.*;
public class ForNameCreator extends PetCreator {
private static List<Class<? extends Pet>> types =
new ArrayList<Class<? extends Pet>>();
// Types that you want to be randomly created:
private static String[] typeNames = {
"typeinfo.pets.Mutt",
"typeinfo.pets.Pug",
"typeinfo.pets.EgyptianMau",
"typeinfo.pets.Manx",
"typeinfo.pets.Cymric",
Type Information
407
"typeinfo.pets.Rat",
"typeinfo.pets.Mouse",
"typeinfo.pets.Hamster"
};
@SuppressWarnings("unchecked")
private static void loader() {
try {
for(String name : typeNames)
types.add(
(Class<? extends Pet>)Class.forName(name));
} catch(ClassNotFoundException e) {
throw new RuntimeException(e);
}
}
static { loader(); }
public List<Class<? extends Pet>> types() {return types;}
} ///:~
Új hozzászólás Aktív témák
A topicot kiemeltem. Valaki nem akar egy nyitó hsz-t írni?:))
- Kodi és kiegészítői magyar nyelvű online tartalmakhoz (Linux, Windows)
- sh4d0w: Nyitlocker
- Robotporszívók
- Spórolós topik
- Fejhallgató erősítő és DAC topik
- Xiaomi 15T Pro - a téma nincs lezárva
- GoodSpeed: Samsung DV90DG52A0ABLE hőszivattyús szárítógép
- Milyen TV-t vegyek?
- Anime filmek és sorozatok
- BestBuy topik
- További aktív témák...
- HP ProBook 650 G2 6.Gen i3 as HP Notebook! Core i3 6100U / 8GB DDR4 / Intel HD / 128GB M.2 /JÓ AKKU!
- Ryzen 5 Gamer! Ryzen 5 5600G / 16GB DDR4 / Nvidia RTX 3050 8GB OC / 500GB SSD+HDD / 500W / RGB LED!!
- Asus ROG Flow Z13 2in1 13.4" FHD+ IPS érintő i9-12900H RTX 3050Ti 16GB 512GB ujjlolv IR kam gar
- X1 Yoga 6th 14" FHD+ IPS érintő i7-1185G7 32GB 512GB NVMe ujjlolv IR kam aktív toll gar
- 233 - Lenovo Legion Pro 7 (16IAX10H) - Intel Core U9 275HX, RTX 5080
- LENOVO Gaming topik - még frissebb lista (2026.01.21)
- BESZÁMÍTÁS! Sapphire B650M R5 7500F 32GB DDR5 1TB SSD RTX 3080 10GB Lian LI LANCOOL 207 FSP 750W
- ÁRGARANCIA!Épített KomPhone i5 10400F 16/32/64GB RAM RTX 3050 6GB GAMER PC termékbeszámítással
- LG UltraFine 4K - 6K és Smart Monitorok -30%
- Apple iPhone 15 256GB, Kártyafüggetlen, 1 Év Garanciával
Állásajánlatok
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest
Cég: Central PC számítógép és laptop szerviz - Pécs
Város: Pécs


