help with questions

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Aug 2004
Posts: 2
Reputation: sunny_b is an unknown quantity at this point 
Solved Threads: 0
sunny_b sunny_b is offline Offline
Newbie Poster

help with questions

 
0
  #1
Aug 16th, 2004
hi guys can you help me with sum questions for my project im struggling with these four questions. thank you

wat are "formal parameters" and "actual values"? and how do we pass data into a function using parametrs

Write the sub definition of a function called example1 which uses two parameters (one an integer and one boolean)and returns an integer.

Do we always need to use a variable to store the value returned from a java function? Explain your answer with example code(snippets).

What syntax do we use in java to indicatethat we are passing a whole array as a parameter to a function(you should consider both the function definition and the function call)?
Reply With Quote Quick reply to this message  
Join Date: Jul 2004
Posts: 1,749
Reputation: nanosani is an unknown quantity at this point 
Solved Threads: 54
Team Colleague
nanosani's Avatar
nanosani nanosani is offline Offline
Unauthenticated Liar

Re: help with questions

 
1
  #2
Aug 18th, 2004
I think these are not project questions. You can find the answers to these questions in you java book.

Anywayz ... here are some hints.
Parameters are values that are passed to functions for the function to use those values. e.g, public void function(int a){} ... here int a is a parameter.
You can get yourself going by reading further about passing parameters by value, and passing by reference.

No we dont always need to store the value returned by a function but it is not usually a good programming practice.

array passing is done like this. public void function( int []a){}
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Java Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC