[Solved] Android java: how to use if-then-else
Here is some code to try: File f = new File(filePathString); if(!f.exists() && !f.isDirectory()) { startDownload(); readFile(); } else { try { file.delete(); } catch (Exception e) { e.printStackTrace(); } } solved Android java: how to use if-then-else