Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

get file dimension java

public static void main(String[] args) {

  String fileName = "src/main/resources/words.txt";

  File f = new File(fileName);
  long fileSize = f.length();

  System.out.format("The size of the file: %d bytes", fileSize);
}
Source by zetcode.com #
 
PREVIOUS NEXT
Tagged: #file #dimension #java
ADD COMMENT
Topic
Name
2+2 =