How to find a line with Maximum length from a File contains data

How to find a line with Maximum length from a File contains data.
SOURCE : MaxLineWordFromFile.java
INPUT

I have stored a file at below location
C:\\new\\testing.txt
testing.txt file contains :---
this is my india and all indian are my ,,,,
all indians are like brothers and sisters and so we can say this our
hello here iamhey be aware of dogs and human
hello
you see!!! what exactly you are talking about



OUTPUT

longest line : all indians are like brothers and sisters and so we can say this our
14







Sandeep Kumar D

Hi, I have written and developed this post so that most of people will be benefited. I'm committed to provide easy and in-depth tutorials on various technologies.I hope it will help you a lot.

- Sandeep Kumar D

Follow Me @Google+




SHARE

    Blogger Comment
    Facebook Comment

0 comments :

Post a Comment