This code will print the current working directory to the console.

Example output:




import java.io.File;

public class CurrentDir {