Untitled
import java.util.InputMismatchException; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner entrada = new Scanner(System.in); int[] lista = {3, 2, -4, 8, 4, 0, 6}; System.out.print("Ingrese un valor de la lista:\n [3, 2, -4, 8, 4, 0, 6]\n > " ); try{ int valor = entrada.nextInt(); double divicion = lista[valor] / lista[valor+1] } catch (InputMismatchException e)) { } //completar... } }