let me make this old it's march second fitted on one line pradeep offered reader and what it's going to get past is basically some strain which is a prompt to ask if the user for the name of the file to open so that's a common thing you want to do you have to use your haywire filed you actually want to open for reading so how might i do that i'm going to start off i want to return one of these buffered readers means i'm going to need to have a buffered reader object here at some point silk i'm going to declare a buffered reader as a local variable tardy and the senate initially to be null which means i created the buffered reader elise i created a pointer four at a reference for it i have not actually created the object yet i can't actually passed make any method called on rd right i'm just sort of created be local variable one minute actually create the object in just a second i'm going to have a while loop here and say while hardy unspeakable equal to know so i know that that's going to ask you the first time through cuz i said it people to know that begin with and then one of the deal in sight here so i have a brace they're going to say hey i'm going to try something that may be dangerous so what i want to try doing is i'm going to ask the user to give me the name of the final so i'm going to have string name equals red-line and also massive whenever prompt was given to me as a friend returned undoing carrot asking the user to ensure the name of the file right in whatever prompted right on the screen is uh... excuse me just whatever was passed in here so might have been something like please enter follows the strengths are right up please enter if i have to use your for the file name now here comes the dangerous part i want to create the buffered reader so i say rd equals new buffered reader and the parameter i'm going to pass to a buffer reader is new final reader and the perimeter i'm going to give to the far reader is whatever in the file name the user gave me so this is just need so what this is going to try to do is whatever the user gave me it's going to try to create one of these new buffered reader object the corresponds to the filed with that name that's actually on this if el file exists and it creates the correspondence life is good already actually now pointing to some valid object which is a buffered reader if that file does not exist i've thrown an exception i say bad times the user mistyped something or they gave me the name of father than exists he has an exception body it's not there i can create the correspondence if that exception thrown right i never created new object which means i never return to of valued assigned to argue which means rd still has the value naal that's important thing 