Usando Throws (3)
class Count {
public static void main (String args[]) {
try {
read();
} catch (IOException e) {
}
}
static void read() throws IOException {
int count = 0;
while (System.in.read() != -1)
count ++;
System.out.println(“Caracteres: ”+count);
}
}
Slide anterior
Slide seguinte
Voltar para o primeiro slide
Exibir versão do elemento gráfico