Did I have to redeclare buttons and edittext in subclass in Android Java? | Sololearn: Learn to code for FREE!
0

Did I have to redeclare buttons and edittext in subclass in Android Java?

Suppose I have a superclass A which contains EditText and a button having protected access modifier. The button on press sets the text to Edittext (say Everytime the button is pressed "a" is inserted into Edittext. Suppose I want to extend this class and in subclass their is nothing which I declared. Suppose the content of subclass contains same Edittext and button having same function. Did I have to rewrite the code for button press or did it just inherit from superclass. Please provide some exple with code.

30th Jan 2019, 2:49 AM
Sheikh Zakir Ahmad
Sheikh Zakir Ahmad - avatar
1 Réponse
28th May 2019, 2:00 PM
–ź–Ĺ–ī—Ä–Ķ–Ļ –ß–į—á–ł–Ĺ, Andrew Chachin
–ź–Ĺ–ī—Ä–Ķ–Ļ –ß–į—á–ł–Ĺ, Andrew Chachin - avatar