how to create package in java using notepad code example Example: compile java code with package in cmd javac –d . demo.java