Java Online Consulation
2 posters
Page 1 of 1
Java Online Consulation
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.
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- Level 0
- Posts : 16
Reputation : 0
Join date : 2010-07-12
Re: Java Online Consulation
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.
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
Re: Java Online Consulation
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.
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- Level 0
- Posts : 16
Reputation : 0
Join date : 2010-07-12
Re: Java Online Consulation
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
Re: Java Online Consulation
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.
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- Level 0
- Posts : 16
Reputation : 0
Join date : 2010-07-12
Re: Java Online Consulation
Ayun. Thanks po, ganun din pala hehe.
arscariosus- Level 0
- Posts : 69
Reputation : -1
Join date : 2010-07-07
Age : 22
Location : Philippines
Similar topics
» Java Forever
» NERDSHARE: Java Tutorial
» The Power of Java in Game Development
» NERDSHARE: Java Tutorial Powerpoint Presentation + Syllabus
» Consultation/Mentoring Program (not online)
» NERDSHARE: Java Tutorial
» The Power of Java in Game Development
» NERDSHARE: Java Tutorial Powerpoint Presentation + Syllabus
» Consultation/Mentoring Program (not online)
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|
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