Skip to content
Snippets Groups Projects
Commit 9f715b64 authored by Manfred Michaelis's avatar Manfred Michaelis :boom:
Browse files

Updated

parent 03b1cfd2
Branches
No related tags found
No related merge requests found
...@@ -21,9 +21,10 @@ class App extends AssmusMenu { ...@@ -21,9 +21,10 @@ class App extends AssmusMenu {
} }
@MenuOption(name = "Quit", pattern = "q") @MenuOption(name = "Quit", pattern = "q")
public void help(Object[] args) { public boolean quit() {
// Sets the run variable of the main loop to false. // If a boolean is returned, the run variable
args[0] = false; // of the main loop will be set to its value.
return false;
} }
} }
``` ```
...@@ -49,6 +50,20 @@ class Main { ...@@ -49,6 +50,20 @@ class Main {
> >
``` ```
## Method parameters
Following parameter will be passed to the called method if
it declares a parameter of the particular type.
| Type | Passed Object |
|----------------|---------------------------------|
| boolean | run variable of main loop |
| BufferedReader | An instance of a BufferedReader |
## Return types
The annotated method must have a return type of `void` or `boolean`.
If the type is `boolean`, the run variable of the main loop will be
set to the return value of the method.
--- ---
## `( •_•)>⌐■-■` ## `( •_•)>⌐■-■`
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment