Replace JAVA equivalent