Computer Science, asked by Esha5088, 11 months ago

what is a method?write a syntax to define method .

Answers

Answered by vimalraj1217
0

Explanation:

Explanation:

Methods of addseperator are as follows:-

1) public void addSeparator()  - This will append a new separator to the end of the menu.

2) public void addSeparator(Dimension size)  - This will append a separator of a specified size to the end of the tool bar.

You need to use this method like below:-

menu.addSeparator();

Answered by 007Boy
5

Answer:

A method is a set of code which is referred to by name and can be called (invoked) at any point in a program simply by utilizing the method's name. Think of a method as a subprogram that acts on data and often returns a value. Each method has its own name.

Similar questions