This is the shortest version of how to read a file and convert it to String in Java:
String myFile = ""; try{ myFile = new String(Files.readAllBytes(Paths.get(myFile.txt)) ); } catch (IOException e) { e.printStackTrace(); }
String myFile = ""; try{ myFile = new String(Files.readAllBytes(Paths.get(myFile.txt)) ); } catch (IOException e) { e.printStackTrace(); }