Step 7) Now let’s say you want to create a sub package p2 within our existing java package p1. In our case file will be saved in parent directory which is C Driveįile saved in parent directory when above code is executed. Step 6) Compile the same file using the following code javac –d. When you open the java package p1 inside you will see the c1.class file. Step 5) When you execute the code, it creates a package p1. The “.” operator represents the current working directory. This command forces the compiler to create a package. Step 4) Now we have to create a package, use the command javac –d.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |