StarUML is a tool for generating class diagrams and other types of Unified Modeling Language (UML) diagrams. This is an open source software for creating class diagrams described in the Java language
StarUML (SU for short) is a tool for creating UML class diagrams and automatically generating Java "stub code". SU can also do JAVA reverse engineering to generate corresponding UML diagrams.
SU can generate code that reflects the structure of the class, rather than the concrete actions of any object. After creating the diagram with SU, you'll want to add the remaining functional code to this stub code, filling in what each method is supposed to do.
Install
Open source software can be downloaded for free
Add new project
Select "Empty Project" in the New Project By Approach dialog
Select and add modules
Select the "Untitled" module in the "Model Explorer" box on the right.
From the "Model" main menu, or by right-clicking on the selected model, you can "Add → Model"
Add class diagram
From the "Model" main menu, or by right-clicking the selected model, you can "Add Diagram → Class Diagram":
set profile
Use the "Model/Profile..." menu to set the profile required by the project. This determines the rules and conventions used by the project. Be sure to include the "JAVA Profile" item. (You can also add your own)
keep
File → save file
Specific operation
There are a series of labels such as Class and Interface in the ToolBox on the left, which can be directly dragged to generate the class diagram you want.