java - Why is it possible to use these abstract methods? -
consider code page saving key - value sets
sharedpreferences sharedpref = getactivity().getpreferences(context.mode_private); sharedpreferences.editor editor = sharedpref.edit(); editor.putint(getstring(r.string.saved_high_score), newhighscore); editor.commit(); why possibile use putint() method without providing implementation since it's abstract method? (see: sharedpreferences.editor) shouldn't impossible do? kindly explain this? thanks.
why possibile use putint() method without providing implementation since it's abstract method?
editor instance of internal class implements sharedpreferences.editor interface. likely, instance of sharedpreferencesimpl.editorimpl.
Comments
Post a Comment