Currently, we are studying how to use androidProgramCall C ++ localCodeWhen using javah to generate a. h file, the following error occurs: No
2. supplement the concept in Java
Java provides a package mechanism to better organize classes. A package is a class container used to separate class namespace. If no package name is specified, all examples belong to a default untitled package. Java packages generally contain related classes. For example, all classes about transportation tools can be placed in a package named transportation.
The programmer can use package to specify the specific package of the class in the source file. The package statement format is:
Package pkg1 [. pkg2 [. pkg3…];
If a package statement exists in the program, it must be the first executable statement in the source file. It can only contain comments or empty lines before it. In addition, a file can have only one package statement.
The package name has a hierarchical relationship, and each layer is separated by points. The package level must have the same structure as the file system of the Java Development System. Generally, the package name must contain lowercase letters, which are different from the naming conventions for the class name that starts with an uppercase letter and starts with an uppercase letter.
When using the package description, the program does not need to reference (import) the same package or any element of the package. The Import Statement is only used to introduce classes in other packages into the current namespace. The current package is always in the current namespace.
If the file is declared as follows:
Package java. AWT. Image
The file must be stored in the Windows Java \ AWT \ image directory or the Unix Java/AWT/image directory.