943,776 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 2812
  • Java RSS
Aug 16th, 2004
0

help with questions

Expand Post »
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)?
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
sunny_b is offline Offline
2 posts
since Aug 2004
Aug 18th, 2004
1

Re: help with questions

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){}
Team Colleague
Reputation Points: 45
Solved Threads: 56
Unauthenticated Liar
nanosani is offline Offline
1,767 posts
since Jul 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: jbuilder question
Next Thread in Java Forum Timeline: Threading question...





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC