Learn Java Tutorial for Beginners (Video), Part 24: Packages

How to use packages in Java. Packages are an important tool for organising your code; you'll also need to understand packages to use other people's code.

When the video is running, click the maximize button in the lower-right-hand corner to make it full screen.

Code for this tutorial:



import ocean.Fish;
import ocean.plants.Seaweed;

public class App {

    public static void main(String[] args) {
        Fish fish = new Fish();
        Seaweed weed = new Seaweed();




package ocean;

public class Fish {



package ocean.plants;

public class Algae {




package ocean.plants;

public class Seaweed {



package com.caveofprogramming.oceangame;

public class Aquarium {