esta bien pero yo lo aria así
import javax.swing.*;
public class Busqueda {
public static void main (String []args){
int [] datos = {3, 12, 22, 25, 28, 32, 38, 45, 56};
int sal=0;
int numero = Integer.parseInt(JOptionPane.showInputDialog("inserte el numero a...