/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package java02.inserir_texto;
//Importar Scanner
import java.util.Scanner;
/**
*
* @author Luis Garcia
*/
public class Java02Inserir_texto {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
String texto;
System.out.println("Digite o texto: ");
Scanner leitor= new Scanner(System.in);
texto=leitor.nextLine();
System.out.println("O texto que escreveu foi "+texto);
}
}
Download

To change this license header, choose License Headers in Project