Social Icons

Java Code

JAVA NETWORK INTRODUCTION





Get URI from File
  The variable of textfile define .txt file location and  output the screen with 
println.

import java.io.File;

public class MainClass {
  public static void main(String args[]) {
    try {
      File testFile = new File("C:\\tables\\2014\\lol.txt");
      System.out.println(testFile.toURI().toString());
    catch (Exception exception) {
      System.out.println("exception");
    }
  }
}


No comments:

Post a Comment

 
Blogger Templates