Java with classes (simple functions + fields)