Hirdetés
Ú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?:))
- ASUS Zenbook 14 UX425EA i7 1165g7/16GB/512SSD/100% sRGB/1.14kg
- Apple Vision Pro 512 GB - Gyári állapotban - 60 nap garancia
- 180-90 Fokos Adapterek CPU / GPU PCIe 6-8pin - 24pin - USB 3.0 / NVIDIA AMD INTEL / A Több Olcsóbb!
- 180-90 Fokos Adapterek CPU / GPU PCIe 6-8pin - 24pin - USB 3.0 / NVIDIA AMD INTEL / A Több Olcsóbb!
- iPhone 17 Pro 256 Gb - Bontatlan / HIVATALOS Apple Resellertől
- 156 - Lenovo LOQ (15IRH8) - Intel Core i5-13505H, RTX 4060
- Új Kipsta agility 100 focicipő (43-as)
- GYÖNYÖRŰ iPhone 13 mini 128GB Blue -1 ÉV GARANCIA - Kártyafüggetlen, MS4188, 94% Akkumulátor
- ÁRGARANCIA!Épített KomPhone i5 12400F 16/32/64GB RAM RTX 5060 Ti 16GB GAMER PC termékbeszámítással
- Lenovo L13 Core I3-10110U / 4GB DDR4 / LAPTOP 1
Állásajánlatok
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest
Cég: Laptopműhely Bt.
Város: Budapest


