Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

resolved: Array from the elements of other arrays

 
Igor Mechnikov
Ranch Hand
Posts: 100
Chrome Linux VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy,

I have 3 String arrays with 7 elements each.
I want to assemble a new 4 element array to include elements from these 3 arrays plus a variable.


My desired outcome is to print out 7 arrays.

Thank you.

Edit: works with String[] allTogether = {propertyName,days[i],rates[i],minimum[i]};
 
Campbell Ritchie
Sheriff
Pie
Posts: 49447
62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ilya Mechnikov wrote: . . . . . .
That will tie you to a particular operating system. You are better off with the specific String:You will have to check what the properties are, in case I have given you the wrong name. Try here.
 
Igor Mechnikov
Ranch Hand
Posts: 100
Chrome Linux VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote:
Ilya Mechnikov wrote: . . . . . .
That will tie you to a particular operating system. You are better off with the specific String:You will have to check what the properties are, in case I have given you the wrong name. Try here.


Thank you very much.
I will start using this.
In this instance, I am trying to adapt existing Interpretive Java ( Bean Shell?) scripts that were initially written on Windows.
I am actually using a Linux box to do that and have not had any problem with the CR/LF in the output.
The intended recipient of the finished script will run it in OSX. I just learned OSX uses normal Unix LF, not old style Mac RC, but there is no telling how it will respond.
 
Campbell Ritchie
Sheriff
Pie
Posts: 49447
62
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Most applications can convert the different kinds of line terminators. But not all. Try \n as a line terminator on M$ Notepad and see what happens I mean, transfer a text file from a Linus box to Notepad, and try to open it.

And, "you're welcome".
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic