Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
alx_mszczonow_1
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
alx_mszczonow_1
Commits
f8764065
Commit
f8764065
authored
Jul 10, 2023
by
Patryk Czarnik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
zapis bez close
parent
460a1bcd
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
1 deletions
+45
-1
.gitignore
.gitignore
+1
-1
Zapis1.java
src/main/java/p24_pliki/Zapis1.java
+22
-0
ZapiszDuzoLiniiBezZamykania.java
src/main/java/p24_pliki/ZapiszDuzoLiniiBezZamykania.java
+22
-0
No files found.
.gitignore
View file @
f8764065
target/
target/
out/
/
out/
### IntelliJ IDEA ###
### IntelliJ IDEA ###
.idea/
.idea/
...
...
src/main/java/p24_pliki/Zapis1.java
0 → 100644
View file @
f8764065
package
p24_pliki
;
import
java.io.FileNotFoundException
;
import
java.io.PrintWriter
;
public
class
Zapis1
{
public
static
void
main
(
String
[]
args
)
{
try
{
PrintWriter
out
=
new
PrintWriter
(
"out/zapis1.txt"
);
out
.
println
(
"Ala ma kota"
);
out
.
println
(
"Ola ma psa"
);
out
.
flush
();
out
.
println
(
"Ela ma chomika"
);
out
.
println
(
"Koniec"
);
// brak close - do pliku trafia tylko część danych sprzed flusha
System
.
out
.
println
(
"Gotowe"
);
}
catch
(
FileNotFoundException
e
)
{
throw
new
RuntimeException
(
e
);
}
}
}
src/main/java/p24_pliki/ZapiszDuzoLiniiBezZamykania.java
0 → 100644
View file @
f8764065
package
p24_pliki
;
import
java.io.FileNotFoundException
;
import
java.io.PrintWriter
;
public
class
ZapiszDuzoLiniiBezZamykania
{
public
static
void
main
(
String
[]
args
)
{
try
{
PrintWriter
out
=
new
PrintWriter
(
"out/liczby.txt"
);
out
.
println
(
"Początek"
);
for
(
int
i
=
1
;
i
<=
10000
;
i
++)
{
out
.
println
(
i
);
}
out
.
println
(
"Koniec"
);
// brak close - do pliku trafia tylko część danych
System
.
out
.
println
(
"Gotowe"
);
}
catch
(
FileNotFoundException
e
)
{
throw
new
RuntimeException
(
e
);
}
}
}
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