@Mohan_Mukherjee No sure if it works, this is what i have in mind right now , just give it a try, so for each question you should load a number between 0 and 1 and based on that you click on like if random number is 0 and Unlike if random number is 1. Continue like this for each question.
String numbers = "01";
String firstQuestion = RandomStringUtils.random(1, numbers);
if(firstQuestion.equals(0)) {
driver.findElementsById("Like").get(0).click();
}else if(firstQuestion.equals(1)) {
driver.findElementsById("unLike").get(0).click();
}
String secondQuestion = RandomStringUtils.random(1, numbers);
if(secondQuestion.equals(0)) {
driver.findElementsById("Like").get(1).click();
}else if(secondQuestion.equals(1)) {
driver.findElementsById("unLike").get(1).click();
}
String nQuestion = RandomStringUtils.random(1, numbers);
if(nQuestion.equals(0)) {
driver.findElementsById("Like").get(n).click();
}else if(nQuestion.equals(1)) {
driver.findElementsById("unLike").get(n).click();
}