buzzContent.setText( comment );
/**
* Execute API method to post an entry.
*/
BuzzComment entry = buzz.createComment( userId, activityId, buzzContent );
/**
* Print creation results
*/
System.out.println( "Comment created: " );
System.out.println( "Content: " + entry.getContent().getText() );
System.out.println( "Id: " + entry.getId() );
System.out.println( "Published: " + entry.getPublished() + "\n" );
/**
* Update the comment
*/
entry.getContent().setText( entry.getContent().getText() + " UPDATED!" );
/**
* Execute API method to update the comment.
*/
BuzzComment updatedComment = buzz.updateComment( userId, activityId, entry.getId(), entry.getContent() );
/**
* Print update results
*/
System.out.println( "Comment updated: " );
System.out.println( "Content: " + updatedComment.getContent().getText() );
System.out.println( "Published: " + updatedComment.getPublished() );
}