goja-core/src/main/java/goja/core/kits/reflect/ClassKit.java
public static String getPackageName(String fqClassName) {
        Preconditions.checkNotNull(fqClassName, "Class name must not be null");
        int lastDotIndex = fqClassName.lastIndexOf(PACKAGE_SEPARATOR);
        return (lastDotIndex != -1 ? fqClassName.substring(0, lastDotIndex) : "");
    }
public static String getPackageName(String fqClassName) {
        Preconditions.checkNotNull(fqClassName, "Class name must not be null");
        int lastDotIndex = fqClassName.lastIndexOf(PACKAGE_SEPARATOR);
        return (lastDotIndex != -1 ? fqClassName.substring(0, lastDotIndex) : "");
    }
public static String getPackageName ( String fqClassName ) { Preconditions . checkNotNull ( fqClassName , "Class name must not be null" ) ; int lastDotIndex = fqClassName . lastIndexOf ( PACKAGE_SEPARATOR ) ; return ( lastDotIndex != - 1 ? fqClassName . substring ( 0 , lastDotIndex ) : "" ) ; }
Determine the name of the package of the given fully-qualified class name,
e.g. "java.lang" for the {@code java.lang.String} class name.

@param fqClassName the fully-qualified class name
@return the package name, or the empty String if the class
is defined in the default package
Determine the name of the package of the given fully - qualified class name e . g . java . lang for the { @code java . lang . String } class name .