Solved

how pass part of array as parameter

Posted on 2000-05-06
3
179 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
Comment Utility
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 10 total points
Comment Utility
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
Comment Utility
did you say anything new in your "answer"?
i think not
kindly withdraw your "answer"
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

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 …
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

763 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now