This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Java in General and the fly likes how to return items from an array to be printed diagonal Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Reply locked New topic
Author

how to return items from an array to be printed diagonal

Johnny Steele
Greenhorn

Joined: Nov 12, 2010
Posts: 12
Hi! I'm working on a method that takes in an array called number and returns its contents to be printed in a diagonal like so:

with tabs in between and each element printed on a new line.
Here is my method which is obviously very wrong but its what I have.

Just cant figure out how to incorporate the new line into a loop or object for that matter.
Thanks,
-John


el Duderino
Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3718
    
  61

I've answered your question on Beginning Java forum. Also, do not post questions on multiple forums please.
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4989
    
    8

Martin Vajsar wrote:I've answered your question on Beginning Java forum. Also, do not post questions on multiple forums please.

Fixed the link.


luck, db
There are no new questions, but there may be new answers.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 43933
    
  33
Martin Vajsar wrote: . . . Also, do not post questions on multiple forums please.
I hadn't noticed earlier, so thank you for noticing.

Closing thread.
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: how to return items from an array to be printed diagonal
 
It's not a secret anymore!