oop java and ruby