How to Override A Method in Java -
i play robocode (it java programming game). want change method
public void onscannedrobot (scannedrobotevent e) { }
to
public int onscannedrobot(scannedrobotevent e){ }
so can adapt robot more if scanned true or false.
i heard possible overriding method. tryed it:
i wrote:
public void onscannedrobot(scannedrobotevent e) { public int onscannedrobot(scannedrobotevent e) { return 1; } }
but won't work
this won't work because return type of overriden method should same or subtype of return type declared in original method. @ link overriding , overloading
Hello Admin,
ReplyDeleteA significant qualification in classes of help purchase does among deeded furthermore right-to-use understandings.
Regards,
Thanks
RITU
In the dynamic world of digital marketing, where imagination meets analytics, businesses unlock limitless possibilities by crafting compelling stories, fostering brand resonance, and igniting a digital revolution that propels them towards unrivaled triumph.
ReplyDeleteDigital marketing institute in Delhi