Java package Keyword

❮ Java Keywords


MyPackageClass.java

package mypack;

class MyPackageClass {
  public static void main(String[] args) {
    System.out.println("This is my package!");
  }
}

Run Example »


Definition and Usage

The package keyword creates a package.


Related Pages

Read more about packages in our Java Packages Tutorial.


❮ Java Keywords

Copyright 1999-2023 by Refsnes Data. All Rights Reserved.