Solved

how pass part of array as parameter

Posted on 2000-05-06
3
202 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 10 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

ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Java Jpanels and Jframe 8 33
login jsp example 24 50
Can anyone please tell me why i can not find ID  investorCoolGrid inside the jsp page? 1 20
Java exception bubble up 2 18
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…

777 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