How do you add a class or an interface to a package in java?

By adding the fully qualified package name as the file line in the Class or Interface.
By adding the fully qualified package name as the file line in the Class or Interface.