class T {
method1() { ... } type0 method2(type1 a, type2 b,...) { ... } }
Only methods that have an explicit return type can return a value. If
you do not have a return statement, Mantra adds return null; for you
at the end.
Methods can have zero or more arguments.
Methods may be overloaded based on number of arguments (but currently
not according to type like you can in Java):
class string {
...
list split() {...}
list split(regex) {...}
}
Like Java, toString, equals are "special" methods.
You can define class methods using static:
class Math {
static int add(int a, int b) { return a+b; }
}
>>