public String aOrAn(String word) {
//code here
Set vowelset = new Set('a','e','i','o','u');
String temp = word;
String result;
If(temp.startsWith(vowelset)){
result = 'an' +temp ;
}else{
result = 'a' +temp ;
}
return result;
}
cHVibGljIFN0cmluZyBhT3JBbihTdHJpbmcgd29yZCkgewogICAgLy9jb2RlIGhlcmUKICAgIFNldCB2b3dlbHNldCA9IG5ldyBTZXQoJ2EnLCdlJywnaScsJ28nLCd1Jyk7CiAgICBTdHJpbmcgdGVtcCA9IHdvcmQ7CiAgICBTdHJpbmcgcmVzdWx0OwogICAgSWYodGVtcC5zdGFydHNXaXRoKHZvd2Vsc2V0KSl7CiAgICAgIHJlc3VsdCA9ICdhbicgK3RlbXAgOwogICAgfWVsc2V7CiAgICAgICAgcmVzdWx0ID0gJ2EnICt0ZW1wIDsKICAgIH0KcmV0dXJuIHJlc3VsdDsKfQ==