Commit 7a542a9f by Patryk Czarnik

Klasa Osoba - przedstawSie

parent 01dc7273
......@@ -4,4 +4,9 @@ public class Osoba {
String imie, nazwisko;
int wiek;
void przedstawSie() {
System.out.println("Nazywam się " + imie + " " + nazwisko
+ " i mam " + wiek + " lat.");
}
}
......@@ -8,5 +8,7 @@ public class Przyklad1 {
a.wiek = 30;
System.out.println(a);
System.out.println(a.imie + " " +a.nazwisko);
System.out.println();
a.przedstawSie();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment