Which is better?
Among Scanner ,BufferedReader and DataInputStream which is bettter one and why?
Please Give the Difference between all three.
BufferedReader br=new BufferedReader(InnputStreamReader(System.in))
[please explain this line(each word)]
I know how to use these but don't know why and when to use and basic difference.
As you wrote yourself already: each has its own use; a DataInputStream can read primitive values in their binary form. A Scanner can read those in their textual form. A BufferedReader is a text only thing and its real functionality is the buffering of the (text) data. You can't say which one is best because those classes have different functionality.
Originally Posted by Anandiscool