Added string constant in java api example.