Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kurs_java_alx_20240321
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Patryk Czarnik
kurs_java_alx_20240321
Commits
e2c8809c
Commit
e2c8809c
authored
Apr 10, 2024
by
Patryk Czarnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ala Niewiadomska
parent
f26233a3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
Osoba.java
src/p11_klasy/podstawy/Osoba.java
+6
-0
Przyklad1.java
src/p11_klasy/podstawy/Przyklad1.java
+14
-0
No files found.
src/p11_klasy/podstawy/Osoba.java
View file @
e2c8809c
package
p11_klasy
.
podstawy
;
public
class
Osoba
{
// Zmienna deklarowana na poziomie klasy to jest:
// pole (field), atrybut (attribute), zmienna instancyjna (instance variable)
// Każdy obiekt tej klasy zawiera pola (które nie są statyczne).
String
imie
=
"Ala"
,
nazwisko
=
"Niewiadomska"
;
int
wiek
=
30
;
}
src/p11_klasy/podstawy/Przyklad1.java
0 → 100644
View file @
e2c8809c
package
p11_klasy
.
podstawy
;
public
class
Przyklad1
{
public
static
void
main
(
String
[]
args
)
{
Osoba
a
=
new
Osoba
();
Osoba
b
=
new
Osoba
();
System
.
out
.
println
(
"Początkowe wartości pól:"
);
System
.
out
.
println
(
a
.
imie
+
" "
+
a
.
nazwisko
+
" "
+
a
.
wiek
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment