Not having a getter method in POJO does not set the values via setter method
I am using org.json library for JSON parsing. I have experienced that when I have two methods say getName() and setName() and if I comment the getter method in my POJO class, the setter method also does not work .
But if i don't, it works. Why this happens? Can't we just set the value in POJO and convert to JSON string?