Java FileReader (read a file)

Java FileReader (read a file)

Bro Code

3 года назад

76,841 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Bro Code
Bro Code - 06.10.2020 20:23

public class Main {

public static void main(String[] args) {

// FileReader = read the contents of a file as a stream of characters. One by one
// read() returns an int value which contains the byte value
// when read() returns -1, there is no more data to be read

try {
FileReader reader = new FileReader("art.txt");
int data = reader.read();
while(data != -1) {
System.out.print((char)data);
data = reader.read();
}
reader.close();

} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

Ответить
Mukhil Ravichandran
Mukhil Ravichandran - 04.10.2023 23:18

commenting for engagement. w video.

Ответить
Ad0rab0n_bon
Ad0rab0n_bon - 02.10.2023 19:50

Tysm i'm going to my final exam with understanding from your codes

Ответить
Kashi Vitagors
Kashi Vitagors - 21.09.2023 23:15

Thank you Bro from Morocco : )

Ответить
Aviv Dukhovich
Aviv Dukhovich - 17.08.2023 15:08

dope video

Ответить
Cakti Fanan
Cakti Fanan - 14.08.2023 06:37

why cant i use the read method

Ответить
Matthes Debes
Matthes Debes - 01.06.2023 16:24

U are a Hero

Ответить
Phúc Lê
Phúc Lê - 21.05.2023 06:47

thanks

Ответить
zstar
zstar - 27.04.2023 22:56

Yo just wanna say that GOD loved the world so much he sent his only begotten
son Jesus to die a brutal death for us so that we can have eternal life
and we can all accept this amazing gift this by simply believing in him (Jesus) asking for the forgiveness of your sins
and forming a relationship with heavenly father.

Ответить
longkesh1971
longkesh1971 - 15.04.2023 03:41

Thanks bro.

Ответить
Groza George
Groza George - 26.03.2023 16:37

😀

Ответить
Everton Dias
Everton Dias - 14.03.2023 23:02

Thanks, Bro!

Ответить
Ali asqar
Ali asqar - 12.03.2023 17:53

Thanks ;)

Ответить
Percival Gebashe
Percival Gebashe - 10.03.2023 10:18

Nice

Ответить
BISA MARKSMAN DOANG
BISA MARKSMAN DOANG - 16.01.2023 01:24

gg

Ответить
Ahmad Bodayr
Ahmad Bodayr - 03.01.2023 17:10

Read About Islam Bro

Ответить
TavaNoGrim0
TavaNoGrim0 - 24.12.2022 18:51

ahhh it just shows a bunch of number instead of words

Ответить
Epical Glory plays
Epical Glory plays - 03.12.2022 13:15

thanks

Ответить
Rockman Zeta
Rockman Zeta - 18.11.2022 19:27

Amazing video, would you consider doing a json reader?

Ответить
Нікіта Орлов
Нікіта Орлов - 12.11.2022 22:43

Hi Brroooooo! You are the best

Ответить
Soumelee
Soumelee - 19.10.2022 16:42

Ответить
tamir rozenfeld
tamir rozenfeld - 04.10.2022 12:42

Thank!

Ответить
BetuBhaiyaAbhi
BetuBhaiyaAbhi - 17.09.2022 06:53

drop a comment below!!

Ответить
Tobi Cipher
Tobi Cipher - 16.09.2022 17:42

Leaving a comment for the algorithm

Ответить
Ariel Minin
Ariel Minin - 14.09.2022 22:06

anyone know why after i run this the image is shown for like a second and then it disapperead?
i even tried it with bro's code and it didnt work

Ответить
Simonas Sabaliauskas
Simonas Sabaliauskas - 10.09.2022 18:35

I like my lectures like I like my beer: clear and inspiring

Ответить
Alex Yakoveno
Alex Yakoveno - 10.09.2022 12:11

nope all file video lessons not working :(, to bad this happens
I follow step by step no file in java folder can be seeing but he there
no output on console

Ответить
Alex Yakoveno
Alex Yakoveno - 10.09.2022 11:26

Ответить
Daniel Milewski
Daniel Milewski - 05.09.2022 11:11

awesome channel! thanks!

Ответить
حفيد ابن الخطاب💀🤍
حفيد ابن الخطاب💀🤍 - 04.09.2022 16:54

i have a problem in my eclipse the auto generated doesn't appear i have to write it anyone can help me

Ответить
Muhammed Kabbani
Muhammed Kabbani - 29.08.2022 13:11

super

Ответить
JBoz
JBoz - 03.08.2022 08:02

Hey man doubt you will see this, u have been very helpful to me, but this just wont work for me, it just keeps saying it cannot find the file. I have no idea what to do and I’ve been struggling in this 6 week summer class for college!

Ответить
Anna Nass
Anna Nass - 24.07.2022 20:20

Thanks again, bro 😎

Ответить
Mahima Singh
Mahima Singh - 14.07.2022 17:02

can't run even if i copy your program and created same file

Ответить
Ania Nowak
Ania Nowak - 13.07.2022 20:45

(●'◡'●)

Ответить
recursive
recursive - 12.07.2022 23:30

Adding comment for support.

Ответить
DPI PLAYZ
DPI PLAYZ - 22.06.2022 21:38

damn that ending HEY YOU got me
LIKED

Ответить
Mr. Loser
Mr. Loser - 09.06.2022 18:14

Thanks

Ответить
zhenni qi
zhenni qi - 06.05.2022 09:33

Really amazing work!

Ответить
İbrahim Yılmaz
İbrahim Yılmaz - 29.03.2022 02:15

thanks bro

Ответить
Naz_ Junior
Naz_ Junior - 26.02.2022 13:00

thanks bro

Ответить
Andi Ahmeti
Andi Ahmeti - 09.01.2022 03:04

Nice

Ответить
Be432 n
Be432 n - 01.01.2022 18:56

ikhjgfdz
';lkjhgfxfl';
';lkjhgvjbkl;"
";'lk;jlhjghvjhbkjlk;l';'
;lbkvnbm,n./l:"
;'lk;jlklkl;';;l
'k;lbL:kjl;kll;';k;lkl'l
;'
lk'
l;kl
l';k'l;
l

Ответить
Rothmans Chong
Rothmans Chong - 17.12.2021 03:55

Nice short of video, easy to learn. 👍👍

Ответить
Kemann
Kemann - 27.11.2021 14:31

Appreciated work❤

Ответить
Jmoney13
Jmoney13 - 13.11.2021 02:51

He makes Java very easy to understand thanks bro keep writing code!!!

Ответить
Mudassir Naz
Mudassir Naz - 15.08.2021 08:40

thanks

Ответить
Sónia Teixeira
Sónia Teixeira - 14.08.2021 00:32

I would like the video butt, u know, 420

Ответить
amien Arya
amien Arya - 13.08.2021 08:47

Bagus sekali penjelasannya. 👍👍😎

Ответить