IntelliJ IDEA 2023.3 Help

Generate toString() dialog

Code | Generate - toString()




Click this drop-down list to choose the template to use.


Click this button to show toString() Generation Settings dialog and set up the behavior and templates of the Generate toString() function.


the Sort Alphabetically button

Click this button to represent the fields in ascending or descending alphabetical order.

App file types java class

Click this button to show classes.

App actions expandall

Click this button to expand all nodes.

App actions collapseall

Click this button to collapse all nodes.

Class members tree view

Click the members to be included in the generated toString() method.

Insert @Override

If this checkbox is selected, the generated code is prepended with the annotation @Override.


Click this button to generate the toString() method with the specified settings and close the dialog.

Select None

Click this button to generate the toString() method that consists of the method declaration and return statement only.


Click this button to discard all changes and close the dialog.

Last modified: 15 August 2023