use joption only
enter 5 integers
enter a number: 5
Output: 5
Enter a number: 6
Output: 5 6
Enter A Number: 5
Output: Please Do not Input same Number
Enter a Number: 7
Output: 5 6 7
and so on till 5 numbers are being inputted
here is my current Code
import javax.swing.*; public class unique { int number[] = new int[5]; public unique() { } public void Uniquetest(){ for(int i=0;i<5;i++){ number[i]=Integer.parseInt(JOptionPane.showInputDialog("Ent er a Number: ")); } } }