program to read/find emails from the given text file
Today morning i need to collect some emails of java guys from the java fourms or websites. So i started copying emails in this page by slecting the email and copying using Ctrl+C, i have done 20 emails copied. Then i lose my patience to copy. Immediately i got an idea, why can't i write a program to read all the emails from the page. Then i copied all the text from the page and pasted in a text file named as
Read more..
emails.txt
. Now the java program came in to the picture and we should use java.io
package to write or read file operations. In addition i am taking java.util.HashSet
and java.util.regex
packages to start our program. Here we are reading a text file containing emails with text and writing into another text file this is called deserialization and serialization.