Creating a new class in an existing compilation unit

An alternative way to create a new class is to add it to an existing compilation unit.

1. In the Package Explorer, double-click a compilation unit to open it in an editor.

2. Type the code for the class at the desired position in the compilation unit.

Related concepts
Java projects

Related tasks
Creating a new Java class
Creating a top-level class
Creating a nested class
Renaming a class, field, or interface
Renaming a compilation unit
Setting execution arguments

Related reference
Package Explorer

Copyright IBM Corporation 2000, 2002. All Rights Reserved.