I have this method:
public String nodePropertyGenerator(Map<String,Object> properties){
String prop="";
for(Map.Entry<String, Object> entry : properties.entrySet()) {
prop += entry.getKey() + ":'" +entry.getValue()+"' ,";
Iterator iterator = properties.entrySet().iterator();
}
return prop;
}
I want to this method return a string like this:
name:'hossein' , age:'24' , address:'khorram'
so I want to check if my map's element be end element , it remove "," from end of string. how to do that. please help me. thanks