I'm new to Java. I'm trying to load all key and value pairs in a file into a Properties object and print out all key and value pairs using Properties.list(PrintWriter p) method. Below is the code I came up with.

However, when I run the code, the IDE did not output anything. Why is this happening? Am I doing something wrong?

```
Properties p1 = new Properties();
InputStream is1 = new FileInputStream("File.txt");
p1.load(is1);
PrintWriter pw1 = new PrintWriter(System.out);
p1.list(pw1);

```