Add assignment code to class constructor
package com.java2s { internal class MyClass { internal var varName = "Unnamed"; public function MyClass (name) { this.varName = name; } } }