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

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -