0
public class ShowDoMilhao {
//constructor of the class
public ShowDoMilhao()
{
}
public static void main(String[] args) throws IOException
{
//string to hold name of txt file
String file1 = "Facil.txt";
////////////////////////////////////////////////////////////
//Storing file into an array of strings
try {
//creating an object (an instance of ReadFile class)
ReadFile file = new ReadFile(file1);
String[] fileContent = new String[file.readLines()];
fileContent = file.OpenFile();
}
catch (IOException e) {
System.out.println(e.getMessage());
}
////////////////////////////////////////////////////////////
System.out.println(fileContent[0]);
} //end of main method
}//end of class
Welcome to sopt. It is difficult to help without knowing exactly your difficulty. Click on [Edit] and better formulate the question, exposing what you are not able to do.
– user28595
fileContent does not exist outside of Try
– Denis Rudnei de Souza