java type methods