FEU - East Asia College ACM Student Chapter
Search
 
 

Display results as :
 


Rechercher Advanced Search

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

» SPICE (Cobol IDE)
Mon May 06, 2013 5:36 pm by 200730059

» YMCA and Global Services
Thu Sep 01, 2011 2:35 pm by Rene Churchill

» useDelimeter
Thu Jun 23, 2011 11:02 am by ern_andrew

» The City of Cochin
Thu Jun 16, 2011 7:31 pm by GhosnBachelder

» LIFE and LOVE GURU
Sat Oct 09, 2010 1:42 am by kggc09

» Interested to be an Adhoc?
Fri Oct 08, 2010 2:47 pm by rmsalazar

» Meeting! Officers + Members (Open Meeting)
Fri Oct 08, 2010 2:45 pm by rmsalazar

» Indescribable - Louis Giglio
Thu Oct 07, 2010 12:03 am by rmsalazar

July 2018
MonTueWedThuFriSatSun
      1
2345678
9101112131415
16171819202122
23242526272829
3031     

Calendar Calendar


Java Online Consulation

Go down

Java Online Consulation

Post by Chyrl on 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.

_________________
David Paul E. Badiola
Director for Education
200810270
chyrl@live.com
avatar
Chyrl
Level 0

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

View user profile

Back to top Go down

Re: Java Online Consulation

Post by arscariosus on 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 : 17
Location : Philippines

View user profile

Back to top Go down

Re: Java Online Consulation

Post by Chyrl on 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.

_________________
David Paul E. Badiola
Director for Education
200810270
chyrl@live.com
avatar
Chyrl
Level 0

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

View user profile

Back to top Go down

Re: Java Online Consulation

Post by arscariosus on 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 : 17
Location : Philippines

View user profile

Back to top Go down

Re: Java Online Consulation

Post by Chyrl on 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.

_________________
David Paul E. Badiola
Director for Education
200810270
chyrl@live.com
avatar
Chyrl
Level 0

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

View user profile

Back to top Go down

Re: Java Online Consulation

Post by arscariosus on 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 : 17
Location : Philippines

View user profile

Back to top Go down

Re: Java Online Consulation

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top


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