Methods
Function declaration Java int multiply(int a, int b) { return a*b; } GoLang func multiply(a, b int) int { return a*b } Multiple results Java class Person { String name; int age; Person(String name, String age) { this.name = name; this.age = age; } } Person getNameAndAge() { return new Person("John", 18) } Person person = getNameAndAge(); var name = person.name; var age = person.age; GoLang func getNameAndAge() (string, int){ return "John", 18 } var name, age = getNameAndAge() Error handling Java try { int i = Integer.