import java.util.*;
import java.lang.*;
import java.io.*;

// The main method must be in a class named "Main".
class Main {
    public static void main(String[] args) {
        Scanner teclado = new Scanner(System.in);
        
        System.out.print("\nDigite su nombre: ");
        String nombre = teclado.nextLine();
        
        System.out.print("\nDigite su edad: ");
        int edad = teclado.nextInt();

        System.out.print("\n\n Su nombre es: " + nombre + " y tiene " + edad + " años");
    }
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: