Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
java_indywidualna
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
java_indywidualna
Commits
1274e0e1
Commit
1274e0e1
authored
Jun 21, 2024
by
Patryk Czarnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
plik mcdonadls.csv oraz poprawki w programach
parent
4948a58f
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
9 additions
and
5 deletions
+9
-5
mcdonalds.csv
mcdonalds.csv
+0
-0
PorownanieSzybkosciList.java
...a/gotowe/p25_kolekcje/a_list/PorownanieSzybkosciList.java
+0
-0
IteratoryListowe.java
...java/gotowe/p25_kolekcje/e_iterator/IteratoryListowe.java
+1
-1
Sortowanie2.java
...in/java/gotowe/p25_kolekcje/s_sortowanie/Sortowanie2.java
+1
-1
P1_Tablica.java
...java/gotowe/p25_kolekcje/zbieranie_danych/P1_Tablica.java
+1
-1
P3_HashSet.java
...java/gotowe/p25_kolekcje/zbieranie_danych/P3_HashSet.java
+4
-0
P5_HashMap.java
...java/gotowe/p25_kolekcje/zbieranie_danych/P5_HashMap.java
+1
-1
ConcMap.java
src/main/java/gotowe/p50_watki/kolekcje/ConcMap.java
+1
-1
No files found.
mcdonalds.csv
0 → 100644
View file @
1274e0e1
This diff is collapsed.
Click to expand it.
src/main/java/gotowe/p25_kolekcje/a_list/PorownanieSzybkosciList.java
View file @
1274e0e1
src/main/java/gotowe/p25_kolekcje/e_iterator/IteratoryListowe.java
View file @
1274e0e1
...
...
@@ -21,7 +21,7 @@ public class IteratoryListowe {
while
(
it
.
hasNext
())
{
String
element
=
it
.
next
();
System
.
out
.
println
(
element
);
System
.
out
.
println
(
it
.
previousIndex
()
+
": "
+
element
);
if
(
"ela"
.
equals
(
element
))
{
it
.
add
(
"maja"
);
// za element bieżący, ale nowowstawione elementy nie będą odwiedzone przez ten iterator
it
.
add
(
"gucio"
);
...
...
src/main/java/gotowe/p25_kolekcje/s_sortowanie/Sortowanie2.java
View file @
1274e0e1
...
...
@@ -49,7 +49,7 @@ public class Sortowanie2 {
System
.
out
.
println
(
lista
);
lista
.
sort
(
Collator
.
getInstance
(
Locale
.
CANADA_FRENCH
));
System
.
out
.
println
(
lista
);
lista
.
sort
(
Collator
.
getInstance
(
new
Locale
(
"pl"
,
"PL"
)));
lista
.
sort
(
Collator
.
getInstance
(
Locale
.
of
(
"pl"
,
"PL"
)));
System
.
out
.
println
(
lista
);
}
}
src/main/java/gotowe/p25_kolekcje/zbieranie_danych/P1_Tablica.java
View file @
1274e0e1
...
...
@@ -16,7 +16,7 @@ public class P1_Tablica {
String
[]
tablica
=
new
String
[
size
];
for
(
int
i
=
0
;
i
<
tablica
.
length
;
i
++)
{
System
.
out
.
print
(
"Podaj imię
nr "
+
i
+
": "
);
System
.
out
.
print
(
"Podaj imię
nr "
+
i
+
": "
);
String
imie
=
scanner
.
nextLine
();
tablica
[
i
]
=
imie
;
}
...
...
src/main/java/gotowe/p25_kolekcje/zbieranie_danych/P3_HashSet.java
View file @
1274e0e1
...
...
@@ -13,6 +13,10 @@ public class P3_HashSet {
// → TreeSet samoczynnie sortuje elementy
// Podstawową (i wydajną) operacją dla zbioru jest sprawdzenie czy element należy do zbioru.
// Operacje, na które zbiór patrzy, aby stwierdzić, czy obiekty są sobie równe, to:
// - hashCode i equals w przypadku HashSet, LinkedHashSet
// - compare lub compareTo w przypadku TreeSet
public
static
void
main
(
String
[]
args
)
{
Scanner
scanner
=
new
Scanner
(
System
.
in
);
...
...
src/main/java/gotowe/p25_kolekcje/zbieranie_danych/P5_HashMap.java
View file @
1274e0e1
...
...
@@ -15,7 +15,7 @@ public class P5_HashMap {
Scanner
scanner
=
new
Scanner
(
System
.
in
);
// W tym słowniku dla imienia osoby pamiętamy wiek tej osoby.
// String (mię) jest kluczem, Integer (wiek) jest wartością.
// String (
i
mię) jest kluczem, Integer (wiek) jest wartością.
Map
<
String
,
Integer
>
slownik
=
new
HashMap
<>();
while
(
true
)
{
...
...
src/main/java/gotowe/p50_watki/kolekcje/ConcMap.java
View file @
1274e0e1
...
...
@@ -29,7 +29,7 @@ public class ConcMap {
private
static
final
int
R
=
10_000
;
// odkomentuj jedną z wersji i sprawdź
//private final Map<String, Integer> map = Collections.synchronizedMap(new HashMap<>());
//
private final Map<String, Integer> map = Collections.synchronizedMap(new HashMap<>());
private
final
Map
<
String
,
Integer
>
map
=
new
ConcurrentHashMap
<>();
//private final ConcurrentMap<String, Integer> map = new ConcurrentHashMap<>();
...
...
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