FEU - East Asia College ACM Student Chapter


Join the forum, it's quick and easy

FEU - East Asia College ACM Student Chapter
FEU - East Asia College ACM Student Chapter
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» “Cochin builders: Symbol of Innovative Architecture”
Java Online Consulation EmptyThu Jul 18, 2013 8:11 pm by shevsoe

» SPICE (Cobol IDE)
Java Online Consulation EmptyMon May 06, 2013 5:36 pm by 200730059

» YMCA and Global Services
Java Online Consulation EmptyThu Sep 01, 2011 2:35 pm by Rene Churchill

» useDelimeter
Java Online Consulation EmptyThu Jun 23, 2011 11:02 am by ern_andrew

» The City of Cochin
Java Online Consulation EmptyThu Jun 16, 2011 7:31 pm by GhosnBachelder

» LIFE and LOVE GURU
Java Online Consulation EmptySat Oct 09, 2010 1:42 am by kggc09

» Interested to be an Adhoc?
Java Online Consulation EmptyFri Oct 08, 2010 2:47 pm by rmsalazar

» Meeting! Officers + Members (Open Meeting)
Java Online Consulation EmptyFri Oct 08, 2010 2:45 pm by rmsalazar

» Indescribable - Louis Giglio
Java Online Consulation EmptyThu Oct 07, 2010 12:03 am by rmsalazar

May 2024
MonTueWedThuFriSatSun
  12345
6789101112
13141516171819
20212223242526
2728293031  

Calendar Calendar


Java Online Consulation

2 posters

Go down

Java Online Consulation Empty Java Online Consulation

Post by Chyrl Wed Aug 04, 2010 9:49 pm

Hi to all members,

After the first part of the Java Tutorial,
Java consultation/mentoring online is now open.

Kindly here your topic about Java your hardly working on.

Remember,
In programming, practice makes good programmers.
Chyrl
Chyrl
Level 0

Posts : 16
Reputation : 0
Join date : 2010-07-12

Back to top Go down

Java Online Consulation Empty Re: Java Online Consulation

Post by arscariosus Thu Aug 05, 2010 7:30 pm

Sir David, paano po mag-read/assign ng multiple variables at a single line halimbawa, separated by a single space?

Gumagana po yung ganito:
x = input.nextInt();
y = input.nextInt();
z = input.nextInt();

Pero gusto ko po sana single line lang parang ganito

scanf("%d %d %d", x, y, z);

o kaya baka po meron din split method sa Java parang sa ruby:

x, y, z = variable.split

Thanks in advance.

arscariosus
Level 0

Posts : 69
Reputation : -1
Join date : 2010-07-07
Age : 22
Location : Philippines

Back to top Go down

Java Online Consulation Empty Re: Java Online Consulation

Post by Chyrl Fri Aug 06, 2010 11:55 pm

There is no equivalent implementation in Java with that C: scanf().
But to solve this thread, the logic would be:

1) Create a loop statement wherein accepts n inputs
2) Store the input to either array of int or a set of variables.

Yet, if I find an equivalent implementation of C: scanf() to Java, I'll post it here right away.
Chyrl
Chyrl
Level 0

Posts : 16
Reputation : 0
Join date : 2010-07-12

Back to top Go down

Java Online Consulation Empty Re: Java Online Consulation

Post by arscariosus Sun Aug 08, 2010 4:06 pm

Thanks sir, I read somewhere that there is a readline() and split(regexp) method although I didn't know where in the API it could be found.

arscariosus
Level 0

Posts : 69
Reputation : -1
Join date : 2010-07-07
Age : 22
Location : Philippines

Back to top Go down

Java Online Consulation Empty Re: Java Online Consulation

Post by Chyrl Tue Aug 10, 2010 5:08 pm

The readlLne() is found in the BufferedReader class of the java.io. package.
The split() is found in the String class of the java.lang. package.

Anyways, you can you nextLine() instead of readLine() though they have similar functions on the program, basically on the System.in implementation.
Chyrl
Chyrl
Level 0

Posts : 16
Reputation : 0
Join date : 2010-07-12

Back to top Go down

Java Online Consulation Empty Re: Java Online Consulation

Post by arscariosus Thu Aug 12, 2010 7:29 pm

Ayun. Thanks po, ganun din pala hehe.

arscariosus
Level 0

Posts : 69
Reputation : -1
Join date : 2010-07-07
Age : 22
Location : Philippines

Back to top Go down

Java Online Consulation Empty Re: Java Online Consulation

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum