coordinates2[i][0]= Double.parseDouble(text2.substring(30,38));//X
			coordinates2[i][1]= Double.parseDouble(text2.substring(38,46));//Y
			coordinates2[i][2]= Double.parseDouble(text2.substring(46,56));//Z

Can I do this:

coordinates2[j]= coordinates2[0]+ coordinates2[1]+ coordinates2[2];

Is it possible to add them all together ?

Recommended Answers

All 2 Replies

Yes, provided i,j are withing the ranges of the 2D array.

But why would you want to add them. I assume that they are coordinates. What is the meaning of adding coordinates?
Sure they are numbers and arrays and you can add them, but I don't seem to know any mathematical theorem that it requires the addition of the X,Y,Z coordinates.
What are you trying to accomplish?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.