|
NOTA: La traducción de esta documentación es un esfuerzo personal y voluntario, no es un documento oficial de Sun Microsystems
ni Oracle ni está patrocinado por ninguna de estas empresas. Los documentos originales (en inglés) están disponibles en:
http://java.sun.com/docs/books/tutorial/.
Dirija cualquier comentario, petición, felicitación, etc. a tutorialesjava_@RROBA_codexion.com. |
Si desea ayudar a mantener en funcionamiento esta web, colaborar con la traducción de estos documentos o necesita que se traduzca algĂșn capĂtulo en concreto puede realizar una donación directa mediante Paypal:
|
Questions
- What methods would a class that implements the
java.lang.CharSequenceinterface have to implement?
- What is wrong with the following interface?
public interface SomethingIsWrong { void aMethod(int aValue){ System.out.println("Hi Mom"); } }
- Fix the interface in question 2.
- Is the following interface valid?
public interface Marker { }Exercises
- Write a class that implements the
CharSequenceinterface found in thejava.langpackage. Select one of the sentences from this book to use as the data. Write a smallmainmethod to test your class; make sure to call all four methods.
- Suppose you have written a time server that periodically notifies its clients of the current date and time. Write an interface the server could use to enforce a particular protocol on its clients.