Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

how pass part of array as parameter

Posted on 2000-05-06
3
Medium Priority
?
231 Views
Last Modified: 2008-02-20
can I pass part of array as parameter or new a sub array from a array without
copying data? thanks.

tony tan
0
Comment
Question by:tanfengkui
  • 2
3 Comments
 
LVL 4

Expert Comment

by:adam923
ID: 2785016
no, you can't pass a sub-array without copying data
you could pass the array and the first and last indicies to the method and then the method could be programmed to just look at the subarray between those indicies
if you have an array of objects just go ahead and copy them, only the references will copy so it won't waste much space
0
 

Accepted Solution

by:
funduraghu earned 30 total points
ID: 2788186
Part of array cannot be passed to a method directly.
If u want a sub array, the required elements are needed to be copied onto a new array



0
 
LVL 4

Expert Comment

by:adam923
ID: 2789073
did you say anything new in your "answer"?
i think not
kindly withdraw your "answer"
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question