I'm trying to get the return value savedName from calling the method. I need to use the value from the string saved name in another method
if (n == 0){
String fullName = readFromFile(); //wont let me do this
text.setText("Welcome " + fullName + ".");
}
private String readFromFile(String savedName){
savedName="";
try {
BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(f)));
savedName = br.readLine();
System.out.println(savedName);
} catch (IOException e) {
e.printStackTrace();
}
return savedName;
}