Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
SzkolenieALX_ProjektPatryka
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
SzkolenieALX_ProjektPatryka
Commits
2c00756a
Commit
2c00756a
authored
Jun 13, 2023
by
Patryk Czarnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drobne poprawki
parent
9e9f6773
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
4 deletions
+5
-4
Konkurencja7a.java
src/p12_kolekcje/e_iterator/Konkurencja7a.java
+1
-1
Sortowanie2.java
src/p12_kolekcje/s_sortowanie/Sortowanie2.java
+1
-1
ZbieranieDanych5_HashSet.java
...2_kolekcje/zbieranie_danych/ZbieranieDanych5_HashSet.java
+2
-1
ZbieranieDanych7_HashMap.java
...2_kolekcje/zbieranie_danych/ZbieranieDanych7_HashMap.java
+1
-1
No files found.
src/p12_kolekcje/e_iterator/Konkurencja7a.java
View file @
2c00756a
...
@@ -16,7 +16,7 @@ public class Konkurencja7a {
...
@@ -16,7 +16,7 @@ public class Konkurencja7a {
for
(
String
s
:
lista
)
{
for
(
String
s
:
lista
)
{
System
.
out
.
println
(
s
);
System
.
out
.
println
(
s
);
if
(
s
.
equals
(
"Ela"
))
{
if
(
s
.
equals
(
"Ela"
))
{
lista
.
add
(
"Nowy"
);
// EXN
lista
.
add
(
"Nowy"
);
// EXN
(w momencie pobierania następnego elementu)
}
}
}
}
}
}
...
...
src/p12_kolekcje/s_sortowanie/Sortowanie2.java
View file @
2c00756a
...
@@ -29,7 +29,7 @@ public class Sortowanie2 {
...
@@ -29,7 +29,7 @@ public class Sortowanie2 {
System
.
out
.
println
(
lista
);
System
.
out
.
println
(
lista
);
// Drugi sposób utworzenia komparatora: klasa anonimowa
// Drugi sposób utworzenia komparatora: klasa anonimowa
// Składnia dost
e
pna od początków Javy
// Składnia dost
ę
pna od początków Javy
System
.
out
.
println
(
"\nlista.sort( klasa anonimowa )"
);
System
.
out
.
println
(
"\nlista.sort( klasa anonimowa )"
);
lista
.
sort
(
new
Comparator
<
String
>()
{
lista
.
sort
(
new
Comparator
<
String
>()
{
public
int
compare
(
String
s1
,
String
s2
)
{
public
int
compare
(
String
s1
,
String
s2
)
{
...
...
src/p12_kolekcje/zbieranie_danych/ZbieranieDanych5_HashSet.java
View file @
2c00756a
...
@@ -22,7 +22,8 @@ public class ZbieranieDanych5_HashSet {
...
@@ -22,7 +22,8 @@ public class ZbieranieDanych5_HashSet {
System
.
out
.
print
(
"Podaj kolejne imię: "
);
System
.
out
.
print
(
"Podaj kolejne imię: "
);
String
imie
=
scanner
.
nextLine
();
String
imie
=
scanner
.
nextLine
();
if
(
imie
.
isEmpty
())
break
;
if
(
imie
.
isEmpty
())
break
;
zbior
.
add
(
imie
);
boolean
b
=
zbior
.
add
(
imie
);
System
.
out
.
println
(
b
);
}
}
System
.
out
.
println
(
zbior
);
System
.
out
.
println
(
zbior
);
System
.
out
.
println
();
System
.
out
.
println
();
...
...
src/p12_kolekcje/zbieranie_danych/ZbieranieDanych7_HashMap.java
View file @
2c00756a
...
@@ -13,7 +13,7 @@ public class ZbieranieDanych7_HashMap {
...
@@ -13,7 +13,7 @@ public class ZbieranieDanych7_HashMap {
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
Scanner
scanner
=
new
Scanner
(
System
.
in
);
Scanner
scanner
=
new
Scanner
(
System
.
in
);
// Przykładowo tutaj dla imienia (
s
tring) pamiętamy wiek (Integer)
// Przykładowo tutaj dla imienia (
S
tring) pamiętamy wiek (Integer)
Map
<
String
,
Integer
>
slownik
=
new
HashMap
<>();
Map
<
String
,
Integer
>
slownik
=
new
HashMap
<>();
while
(
true
)
{
while
(
true
)
{
...
...
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