Hello Jenish. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
Hello Akshay. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
Hello Friend. Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos. You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link: goo.gl/kqvaf2
Thank you for Wonderful Class. Hey! Why SUN people not use newLine() method in FileWriter and readLine() method in FR. What is the need to make new concept Buffer Writer and Buffer Reader? Can you please Enlighten us...
Hi Rahul singh.The methods getBinaryStream() , getAsciiStream() , and getUnicodeStream() ... you can get the column as a Java InputStream and use the read() method of the ...
In Java 11 onwards, you can open a FileReader() and tell it which CharacterSet to use in the constructor (for instance, "UTF-8". Before that, you can only open one using the Default Character Set you are running with.
Int and Long are datatypes, not reference variables. We can typecast long to int. If the value we receive is within the int range then no problem but if it exceeds the int range then we will get a negative int value or a positive value depending upon the long value. You can check the range values of these datatypes for yourself and run it in a program. For example, the range of byte is -128 to 127, and short is -32,767 to 32,737. Short i = 130; Byte b = i; Here we will get an error if we don't typecast. So we use Byte b = (byte)i; System.out.println(b); The answer we will get is -126, as the short value isn't accommodated in the byte-range so by typecasting we tell the compiler to go ahead and assign the value. This is a similar case with int and long.
it is not like what u r thinking buffered reader is completely different thing think like buying items single by single and checking out to hjome one by one and adding your items in a cart at once and checkout once
1:21:30 i don't understand when i run the BufferedReader progrm......o/p is getting displayed in a single line whatz wrong please suggest? abcd.txt: -------------- d abcd learn java from durga code: --------- import java.io.*; class BufferedReaderDemo { public static void main(String[] args) throws IOException { File f=new File("abcd.txt"); FileReader fr=new FileReader(f); BufferedReader br=new BufferedReader(fr);
String s=br.readLine(); //read data line by line. while(s!=null){ System.out.print(s); s=br.readLine(); } br.close(); } } o/p: dabcdlearn java from durga
hai sir : bufferreader cannot communicate with the file directly and it is communicate through filereader .but file reader can read only char by char then how bufferreader can read line by line through filereader .reply please .
"BufferedReader" as name contains "Buffer" which means its kind of container to hold the data.With the help of readers(in this case FileReader) BufferReader keeps gettingcharacters until it gets " " .As soon as it encounters newline character it covers those chacters to String. and now we can read a whole line with the help of methods provided by BufferedReader
Great great great explanation sir thank you very much for such helping😊👍👍👍
Hello Jenish.
Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos.
You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link:
goo.gl/kqvaf2
Completed watching on Sept 21, 2024 at 7.05 PM :)
Bravo 🎉🎉🎉
COMPLETED THIS VIDEO TOO
DAY 44 OF #75daysofcode in Java
7 April, 2024
Nice explinations sir solved other practical examples for practical hanbooks
Hello Akshay.
Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos.
You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link:
goo.gl/kqvaf2
Very talented sir 🙏🙏🙏🙏
Hello Friend.
Thanks for your valuable feedback. It will boost us to do new things. Please subscribe to get updates about new videos.
You can view all other Core Java with SCJP/OCJP Videos by Durga sir in the following link:
goo.gl/kqvaf2
thanks alot sir
Thank you sir
122 video completed❤🎉🎉
Thank you for Wonderful Class.
Hey! Why SUN people not use newLine() method in FileWriter and readLine() method in FR. What is the need to make new concept Buffer Writer and Buffer Reader?
Can you please Enlighten us...
Thanks for awesome explanation . Just one thing read() method return ASCI or unicode
Hi Rahul singh.The methods getBinaryStream() , getAsciiStream() , and getUnicodeStream() ... you can get the column as a Java InputStream and use the read() method of the ...
Unicode as characters are of 2 bytes in java and uses UNICODE representation.
In Java 11 onwards, you can open a FileReader() and tell it which CharacterSet to use in the constructor (for instance, "UTF-8". Before that, you can only open one using the Default Character Set you are running with.
You are Awesome Sir !!
how can we type cast to long to int for length( ) method, child cannot hold parent right? (byte--short--int---long---float-Double)
Int and Long are datatypes, not reference variables. We can typecast long to int. If the value we receive is within the int range then no problem but if it exceeds the int range then we will get a negative int value or a positive value depending upon the long value.
You can check the range values of these datatypes for yourself and run it in a program.
For example, the range of byte is -128 to 127, and short is -32,767 to 32,737.
Short i = 130;
Byte b = i;
Here we will get an error if we don't typecast.
So we use Byte b = (byte)i;
System.out.println(b);
The answer we will get is -126, as the short value isn't accommodated in the byte-range so by typecasting we tell the compiler to go ahead and assign the value.
This is a similar case with int and long.
@@luciferg3587 amazing really amazing explanation ❤️
Sir how to display txt file names with prefix input from a folder
The out put is not coming corrent when i am writing fr.read(). in place of i
Sir one doubt we can't communicate buffer reader directly to abc.txt file
Hello Raghavender.
Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
what is need of close method
What is role of void close() in the file reader
Hello Pavan.
Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
it is not like what u r thinking buffered reader is completely different thing think like buying items single by single and checking out to hjome one by one and adding your items in a cart at once and checkout once
In FIleReader why do we say we are reading data character by character, when we use int read(char []) method it is not character by character.
Hello Ravi.
Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
hello anna...is this video relevant in 2022..after 8 years
Hello Friend.
Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
Sir one doubt i.e.
Fr.write(Ch);
Is this statement total character read at one time?
Hello Jayram.
Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
Yes
please dont watch without liking otherwise i will give you big left n right😂
1:21:30 i don't understand when i run the BufferedReader progrm......o/p is getting displayed in a single line whatz wrong please suggest?
abcd.txt:
--------------
d
abcd
learn java
from durga
code:
---------
import java.io.*;
class BufferedReaderDemo
{
public static void main(String[] args) throws IOException
{
File f=new File("abcd.txt");
FileReader fr=new FileReader(f);
BufferedReader br=new BufferedReader(fr);
String s=br.readLine(); //read data line by line.
while(s!=null){
System.out.print(s);
s=br.readLine();
}
br.close();
}
}
o/p: dabcdlearn java from durga
Hello Pranay.
Plz contact our online team durgasoftonlinetraining@gmail.com or call us on this number +918885252627, 7207212427/28
please use System.out.println instead of System.out.print in your code.
I got a CE- cannot find symbol
import java.io.*;
class BufferedReaderDemo
{
public static void main(String[] args)throws IOException
{
FilerReader fr=new FileReader("abc.txt");
BufferedReader br=new BufferedReader(fr);
String line=br.read();
while(line != null)
{
System.out.println(line);
line=br.read();
}
br.close();
}
}
read() method return type is int but not String & when BufferedReader is used better to go for readLine() method instead of read() method.
FilerReader fr=new FileReader("abc.txt"); it is FileReader and not " FilerReader " . please correct
hai sir :
bufferreader cannot communicate with the file directly and it is communicate through filereader .but file reader can read only char by char then how bufferreader can read line by line through filereader .reply please .
"BufferedReader" as name contains "Buffer" which means its kind of container to hold the data.With the help of readers(in this case FileReader) BufferReader keeps gettingcharacters until it gets "
" .As soon as it encounters newline character it covers those chacters to String. and now we can read a whole line with the help of methods provided by BufferedReader
thank u ver much sir
what is need of close method
what is need of close method