Imprime lo que escribas.
import java.util.*;
public class escribir{
public static void main(){
int x;
String texto;
Scanner teclado = new Scanner (System.in);
do {
System.out.println("Escribe tu texto: ");
texto = teclado.next();
System.out.println(texto);
System.out.println("Imprimir otro texto 1.si / 2.no");
x = teclado.nextInt();
}
while (x==1);
}
}