This code will print the size of a file in bytes to the console.



import java.io.File;

public class FileSize {

/**
* JavaProgrammingForums.com