Hirdetés
- Apple iPhone 17 Pro Max – fennsík
- Motorola Edge 40 - jó bőr
- Milyen okostelefont vegyek?
- Bemutatkozott a Poco X7 és X7 Pro
- iPhone topik
- Samsung Galaxy S25 Ultra - titán keret, acélos teljesítmény
- Huawei P30 Pro - teletalálat
- One mobilszolgáltatások
- Samsung Galaxy S25 - végre van kicsi!
- EarFun Air Pro 4+ – érdemi plusz
Új hozzászólás Aktív témák
-
caindwan
aktív tag
Heló!
Igazából még csak nemrég kezdtem az egészet. Egy ebookból tanulok és ott nem magyarázták meg a dolgot. Szóval van egy ilyen pl.:
public class AClass {
public int instanceInteger = 0;
public int instanceMethod() {
return instanceInteger;
}
public static int classInteger = 0;
public static int classMethod() {
return classInteger;
}
public static void main(String[] args) {
AClass anInstance = new AClass();
AClass anotherInstance = new Aclass();
anInstance.instanceInteger = 1;
anotherInstance.instanceInteger = 2;
System.out.println(anInstance.instanceMethod());
System.out.println(
anotherInstance.instanceMethod());
//System.out.println(instanceMethod()); //illegal
//System.out.println(instanceInteger); //illegal
AClass.classInteger = 7;
System.out.println(classMethod());
System.out.println(anInstance.classMethod());
anInstance.classInteger = 9;
System.out.println(anInstance.classMethod());
System.out.println(anotherInstance.classMethod());
}
}
Na ebben vannak olyanok a metódusban pl/anInstance.instanceInteger = 1;/ A kérdésem mit jelent az a pont?
Új hozzászólás Aktív témák
A topicot kiemeltem. Valaki nem akar egy nyitó hsz-t írni?:))
- Apple iPhone 11 64GB, Kártyafüggetlen, 1 Év Garanciával
- Apple iPhone 11 64GB, Kártyafüggetlen, 1 Év Garanciával
- Apple iPhone 11 64GB, Kártyafüggetlen, 1 Év Garanciával
- Apple iPad 9th Gen 256GB, Wi-Fi+Cellular, Kártyafüggetlen, 1 Év Garanciával
- Samsung Galaxy A53 5G 128GB, Kártyafüggetlen, 1 Év Garanciával
- Dell Latitude E7440 - i5, 8GB RAM, HDMI, eu bill - számla, 6 hó garancia
- Mio Star 8750B Automata kávégép 6 hónap Garancia Beszámítás Házhozszállítás
- 146 - 147 - 166 - 167 - 168 - 169 - Lenovo Legion Pro 7 (16IRX9H) - Intel Core i9-14900HX, RTX 4090
- 16 GB-os Quadro RTX5000 HP
- BESZÁMÍTÁS! MSI B450 R5 5600X 32GB DDR4 512GB SSD RTX 3080 10GB Zalman Z1 Plus Cooler Master 750W
Állásajánlatok
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest
Cég: Laptopműhely Bt.
Város: Budapest


