Add some java tricks