I think that basically you want a property with a comment with a description. If so, then
Properties props=new Properties();
props.add("key","value");
FileOutputStream output=new FileOutputStream("props.dat",true);
props.store(output,"Sample properties");
source
share