Demonstration of the building process of a simple Java Program named OnePlusOne.java.
Description of Java compilation process, dynamic linking vs static linking. Please download the program and try it.
You may create a new class in BlueJ environment. Then, you do cut and paste from this file to you own class.
Or, you may copy this file to a specific directory that you have already build. And, after that call BlueJ, BlueJ will automatically recognize the program file.