copy paste especial para netbeans

un ejemplo



/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

import java.io.*;
/**
*
* @author marlon
*/

public class Teclado {
public static void main(String[] args)throws IOException {
InputStreamReader lector = new InputStreamReader(System.in);
BufferedReader entrada = new BufferedReader(lector);
String texto1, texto2;
System.out.print("Escribe tu nombre: ");
texto1=entrada.readLine();
System.out.print("Escribe tu apellido: ");
texto2=entrada.readLine();
System.out.println("Hola " + texto1 + " " + texto2);
}

}

0 comentarios: