If writing and reading files is advanced...
agrs700 3 weeks ago
You know you're a geek when this gets you excited!
Please continue making tutorials, they are great! Just wish you would talk instead of typing instructions :)
mrhozer 2 months ago in playlist More videos from 12SamP12
this is not advanced
gentlesod 11 months ago
This tutorial is very useful, thank you
stet184 11 months ago
File writing is not advanced Java..
TehOosRsGuides 1 year ago
no sound???
MrSuavito 1 year ago
Thanks, it works. I noticed there are multiple ways to do this. Which one is the best. Example:
PrintWriter out = new PrintWriter("test.txt");
out.println("Bla bla bla");
out.close();
FileReader reader = new FileReader("test.txt");
// if file doesn't exist it creates a file
Scanner in = new Scanner(reader);
if (in.nextLine() etc...) {// do this}
in.close();
No1CGIguy 2 years ago
do i have to import any thing for this java file
subwater911 2 years ago
You probably have to. I know the scanner needs an import.
to add a " you should use \"
12SamP12 2 years ago
how do I add special characters like " , in the text ? and btw, i tried the ("C:\Users\-username... thing, but it didnt work, i got this error :
Invalid escape sequence (valid ones are \b \t \n \f \r \" \' \\ )
thanks a lot in advance
TheUserWithNoVids 2 years ago
Make more tutorials about desktop applications in java!
That would help me!!!
Coplicationsmeisterg 2 years ago
Thank you man
I really love java
how to give the path of a file instead of just the file
rockykris 2 years ago
For example: if you want to write a file on your desktop:
File someFile = new File("C:\Users\-username-\Desktop");
@12SamP12 Isn't it File someFile = new File("C:\\Users\\-username-\\Desktop");
"\\" means "\" because just a "\" can represent things like line breaks etc.
hoddie54 4 weeks ago
If writing and reading files is advanced...
agrs700 3 weeks ago
You know you're a geek when this gets you excited!
Please continue making tutorials, they are great! Just wish you would talk instead of typing instructions :)
mrhozer 2 months ago in playlist More videos from 12SamP12
this is not advanced
gentlesod 11 months ago
This tutorial is very useful, thank you
stet184 11 months ago
File writing is not advanced Java..
TehOosRsGuides 1 year ago
no sound???
MrSuavito 1 year ago
Thanks, it works. I noticed there are multiple ways to do this. Which one is the best. Example:
PrintWriter out = new PrintWriter("test.txt");
out.println("Bla bla bla");
out.close();
FileReader reader = new FileReader("test.txt");
// if file doesn't exist it creates a file
Scanner in = new Scanner(reader);
if (in.nextLine() etc...) {// do this}
in.close();
No1CGIguy 2 years ago
do i have to import any thing for this java file
subwater911 2 years ago
You probably have to. I know the scanner needs an import.
No1CGIguy 2 years ago
to add a " you should use \"
12SamP12 2 years ago
how do I add special characters like " , in the text ? and btw, i tried the ("C:\Users\-username... thing, but it didnt work, i got this error :
Invalid escape sequence (valid ones are \b \t \n \f \r \" \' \\ )
thanks a lot in advance
TheUserWithNoVids 2 years ago
Make more tutorials about desktop applications in java!
That would help me!!!
Coplicationsmeisterg 2 years ago
Thank you man
I really love java
Coplicationsmeisterg 2 years ago
how to give the path of a file instead of just the file
rockykris 2 years ago
For example: if you want to write a file on your desktop:
File someFile = new File("C:\Users\-username-\Desktop");
12SamP12 2 years ago
@12SamP12 Isn't it File someFile = new File("C:\\Users\\-username-\\Desktop");
"\\" means "\" because just a "\" can represent things like line breaks etc.
hoddie54 4 weeks ago