Contenido de certificación
Buscar
Social
Ofertas laborales ES
« Lambda Quick Start | Main | Duda sobre ArrayList y Vector. »
sábado
feb072015

Definición de métodos

Que tal compañer@s. ¿Sabéis indicar si el siguiente código compila, y si no es el caso, por qué motivo? ¿Qué lineas se podrían eliminar para que compilase?

01.package scjp;
02. 
03.public class DefinicionDeMetodos {
04. 
05.    private void sayHello() {
06.         
07.    }
08.     
09.    private void sayHello(int a) {
10.         
11.    }
12.     
13.    public void sayHello() {
14.         
15.    }
16. 
17.    public void sayHello(int a) {
18.         
19.    }
20.     
21.    private void sayHello() throws Exception{
22.         
23.    }
24.     
25.    private void sayHello(int a) throws Exception{
26.         
27.    }
28. 
29.}

Reader Comments

There are no comments for this journal entry. To create a new comment, use the form below.

PostPost a New Comment

Enter your information below to add a new comment.

My response is on my own website »
Author Email (optional):
Author URL (optional):
Post:
 
Some HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>