import java.util.Scanner; /* * 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. */ /** * * @author user */ public class Ejercicio04 { public static void main(String[] args) { String nombre = new String(); System.out.print("Introduzca su nombre porfis: "); Scanner sc = new Scanner(System.in); nombre = sc.nextLine(); System.out.println(""); System.out.println("Bienvenido " + nombre + "!"); } }