Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
2
20231104-KursPodstawowyALX
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
20231104-KursPodstawowyALX
Commits
6385d87a
Commit
6385d87a
authored
Dec 02, 2023
by
Patryk Czarnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
v0 - wbudowane metody
parent
435e2ef0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
Program0.java
src/main/java/p10_klasy/v0/Program0.java
+13
-0
No files found.
src/main/java/p10_klasy/v0/Program0.java
View file @
6385d87a
...
...
@@ -7,8 +7,21 @@ public class Program0 {
// Dzięki temu, że mamy zdefiniowaną klasę Osoba,
// możemy deklarować zmienne tego typu i tworzyć obiekty tej klasy.
Osoba
a
=
new
Osoba
();
Osoba
b
=
new
Osoba
();
System
.
out
.
println
(
a
);
System
.
out
.
println
(
b
);
System
.
out
.
println
();
// Każdy obiekt w Javie posiada kilka predefiniowanych metod:
System
.
out
.
println
(
a
.
getClass
());
System
.
out
.
println
(
a
.
toString
());
System
.
out
.
println
(
a
.
hashCode
()
+
" , "
+
b
.
hashCode
());
System
.
out
.
println
(
a
.
equals
(
a
));
System
.
out
.
println
(
a
.
equals
(
b
));
// i jeszcze metody zw. z synchronizacją wątków:
// wait, notify, notifyAll
// i niepubliczne metody clone oraz finalize, które twórca klasy może "upublicznić"
}
}
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