Any java programmer knows that he has to create an instance of the child class. So one of the reason why getting nullpointerexception is
if you code a condition like this
if (xxx==10) {
...
}
while the complier finds that the value is null, the npex appears. Possible solution is to use
if (xxx!=null) first to avoid it.
if you code a condition like this
if (xxx==10) {
...
}
while the complier finds that the value is null, the npex appears. Possible solution is to use
if (xxx!=null) first to avoid it.