added java common methods