Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Hello world example in Akin Java
# Hello World example in Akin Java
# Akin (
package: akin example.
# I made imports explicit just to show
# how to import classes static members
import: java lang String,
java lang Runnable,
java lang System out
# To create a subclass the syntax will be
# <ParentClass> class(<Interface>,<Interface2>, <ClassBody>)
# If no ParentClass specified, it will be java.lang.Object
Hello = class(Runnable):
# Akin Java will have type inference
final static private hello = "Welcome to Akin"
initialize =: @name
{Override} run =:
5 times(i): out println(i+": "+toString)
toString() = "$(hello): $(name)"
static main(argv String[]) = new(argv[0]) run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment