How should I represent the main method (java) using UML?

I have three classes: Bridge, Main and Car. I have no idea about how to include the main method in my UML representation. Should I list all the attributes...as well as the main method?

The main method does: - a bit of calculation - instantiate the other two classes

I would draw the Main, this way:

--------------------------- Main --------------------------- --------------------------- + main(String[] args): void ---------------------------

Is that correct? Thanks


Your drawing is good, you just need to underline the main method to show that it is static. I think that you should model it since it shows that this class is one entry point to the system (there may be more).


you don't need to include main method in your UML and also as I remember, you should put all the members and methods that are present in your class except the main method. Since the main method is somewhat a given already


  • Turn long dataset of classes taken into wide dataset where variables are dummy code for each class
  • Eclipse IDE plugin development: copy files from plugin jar to active project folder
  • Call constructor of template parameter
  • JSF 2.0: @ResourceDependency does not work when adding UIComponent programmatically
  • Android MasterDetail layout inside ActivityTab avoiding nested Fragments
  • Hibernate @OneToOne with Shared Primary Key(bidirectional). Dependent entity not persisted in DB.
  • VHDL - iSIM output uninitialised, doesn't change states
  • Angularjs: [$injector:modulerr] Failed to instantiate module ui-router
  • JPS useBean with HashMap
  • Cannot instantiate the type Image java?
  • WPF Image control clipping
  • How to initialize context? [closed]
  • CSS Grid, position absolute an element in a css grid item: IMPOSSIBLE
  • Visualizing a large matrix in matlab
  • Change attribute of custom directive
  • What does certain JVM do after loading ByteCode into memory?
  • Should a web service response include empty values?
  • how to get data attributes of dynamically generated element
  • Adding a model to a Marionette CollectionView's collection doesn't trigger onItemAdd callb
  • C# fibonacci function returning errors
  • ListItem.Attributes.Add not working
  • Moving Android View and preventing onDraw to be called over and over again
  • Blackberry - Custom EditField Cursor
  • How to change the font size of a single index for UISegmentedControl?
  • Allowing both email and username for authentication
  • Get one-time binding to work for ng-if
  • Update CALayer sublayers immediately
  • Date difference with leap year
  • Is possible to count alias result on mysql
  • Hazelcast - OperationTimeoutException
  • How do you troubleshoot character encoding problems?
  • AT Commands to Send SMS not working in Windows 8.1
  • Windows forms listbox.selecteditem displaying “System.Data.DataRowView” instead of actual value
  • Turn off referential integrity in Derby? is it possible?
  • apache spark aggregate function using min value
  • Add sale price programmatically to product variations
  • Django query for large number of relationships
  • Sorting a 2D array using the second column C++
  • Unable to use reactive element in my shiny app
  • How do I use LINQ to get all the Items that have a particular SubItem?