Welcome! Log In Create A New Profile


semester2,assign.2 Q2

Posted by Anonymous User 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
Anonymous User
semester2,assign.2 Q2
August 12, 2010 10:51PM
Hi I need some help with this question. We must write a program that reads arguments and prints them in reverse. Must the arguments be stored in a array and then printed in reverse or must there be input from the keyboard. Looking at the program execution example given ">java Reverse To be or not to be" .Is that a example that must be input in the command line? Anybody that completed this question that can please me to get it right. Thanx
Re: semester2,assign.2 Q2
August 17, 2010 01:40PM
My understanding of the question is that the input must be read from the keyboard.
I then took the input, split the string into words using the split() method and stored the words in an array.
Finally, I used a for loop to print the words to the screen.
Sorry, only registered users may post in this forum.

Click here to login