All Questions
4 questions
1
vote
2
answers
329
views
What goes on behind the scenes when data is passed through the use of interfaces?
I understand an interface is a contract and if a class implements that interface, it must define those abstract methods from the interface. What I don't understand is, how is data passed between two ...
11
votes
1
answer
3k
views
Why doesn't CharSequence define contains(CharSequence)?
This applies to to both Java SE & Android, as the contracts are identical.
CharSequence documentation for Java SE
CharSequence documentation for Android
CharSequence does not define a contains(...
1
vote
2
answers
328
views
Is this one method interface a good response to this interview question?
Today I received a rejection letter from a company where as part of the interview process they gave a a couple days to respond to the following question (paraphrased):
Let’s say say you have ...
10
votes
2
answers
10k
views
What is the proper way to implement the OnClickListener interface for many buttons
My Android Activity contains multiple buttons that all need an OnClickListener. I've seen lots of different ways of doing this such as::
Implementing the interface in activity class
Creating a ...