Given the following directory structure:

```
/top
   |--- wrk
          |--- pkg
                  |--- A.java
                  |--- B.java

```

Assume that the two files `A.java` and `B.java` contain the following code, respectively:

```
// Filename: A.java
package pkg;
class A { B b; }

// Filename: B.java
package pkg;
class B {...}

```

Assuming that the current directory is `/top/wrk`

Why does the command `javac -cp . pkg/A.java` work successfully even though we have not yet compiled `B.java`?

Also if the current directory is `/top/wrk/pkg` then the command `javac A.java` works. How so?