I learned about something to pay attention to. Java and Package location

xiaoxiao2021-03-06  119

Built a project catalog, myapp. Write a Java file in this directory, declared package: package com.xyn.data; if a new file is written, use this package, and the reference path is import com.xyn.data; then this file is also Building it under the MyApp folder, so that the package above can be cited correctly. Note this path problem. Packaged cmd: javac -d. FileName.java

转载请注明原文地址:https://www.9cbs.com/read-102353.html

New Post(0)