Here a problem where i have a process where user want some data file(textfile.txt) from somehere for example from D:\smart\rs334455.txt. After user have that file, user can choose whether he want to save the file or display it as a text file.
Could anyone in here give me some example code because I have search many times through the web but i didn't get any solution or example about it.
~really need help here..

Your question is not very clear at all. You wish to know how to open and view a text file in Java?

You can use Scanner to open and read in files..

for reading u can use Inputstream and for writing u can use outputstream classes with the help of read and write methods in a loop condition.