Results 1 to 2 of 2
  1. #1
    oszc is offline Member
    Join Date
    Aug 2011
    Posts
    20
    Rep Power
    0

    Arrow can i receive 3 different type of data in one line ?

    hi,all

    i want input 1,3 and assign to a b c
    i try
    a = input.nextInt();
    c = input.next("," );
    b = input.nextInt();

    but i should add space among the datas (e.g. 1 , 3 )
    is there any solutions that i can input 1,3 without space ?

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,879
    Rep Power
    25

    Default

    What happens when you execute your code? It would help if you would execute it and print out your results.

    There might be a regular expression solution to this.
    Last edited by Norm; 08-04-2011 at 02:28 PM.

Similar Threads

  1. Receive data from an array
    By phixion in forum New To Java
    Replies: 6
    Last Post: 01-27-2011, 01:50 AM
  2. how to receive all data with UDP client
    By simplo in forum Networking
    Replies: 16
    Last Post: 08-19-2010, 03:14 PM
  3. Replies: 9
    Last Post: 04-07-2009, 04:51 AM
  4. Replies: 1
    Last Post: 01-28-2008, 11:49 AM
  5. PC receive data via Bluetooth using JAVA
    By toncoolx in forum New To Java
    Replies: 0
    Last Post: 11-27-2007, 05:50 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •