How to get String and Integer input at the same time?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kosh
    New Member
    • Mar 2015
    • 1

    How to get String and Integer input at the same time?

    Code:
    public static void main(String[] args) 
    {
    		String acc =
     JOptionPane.showInputDialog("Enter a string:");
      int ia = Integer.parseInt(acc);
    		String[] s = acc.split(",");
    if a user enter a,1,2,l,6 i want to seperate the string and integer.
Working...