PROGRAMMING, LOGIC and DESIGN 8th EDITION
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Go down
avatar
JUNGKOOK
Guru
Guru
Posts : 10
Join date : 2018-08-20

Passing an Array to a Method - Page 2 Empty Re: Passing an Array to a Method

Mon Aug 20, 2018 4:06 pm
Noob wrote:
Hyegi wrote:This is such a good post. I now understand the arrays. Looking forward to your future discussions.


site some examples yhegiiee yhegiiee hahaha

Yah. thankyou for this information
avatar
JUNGKOOK
Guru
Guru
Posts : 10
Join date : 2018-08-20

Passing an Array to a Method - Page 2 Empty Re: Passing an Array to a Method

Mon Aug 20, 2018 4:06 pm
Thankyou for the information mam, natulungan moko sa assignment ko hahahaha salamaaaaaaaaat
avatar
athenakenji
Guru
Guru
Posts : 10
Join date : 2018-08-20

Passing an Array to a Method - Page 2 Empty Re: Passing an Array to a Method

Mon Aug 20, 2018 4:30 pm
JUNGKOOK wrote:Does the basis in lecture are the things to identify the truth or lie?

yes. you may find the answer on the lecture but you may also site more references as your basis.
avatar
athenakenji
Guru
Guru
Posts : 10
Join date : 2018-08-20

Passing an Array to a Method - Page 2 Empty Re: Passing an Array to a Method

Mon Aug 20, 2018 4:42 pm
Although Java is strictly pass by value, the precise effect differs between whether a primitive type or a reference type is passed.
When we pass a primitive type to a method, it is passed by value. But when we pass an object to a method, the situation changes dramatically, because objects are passed by what is effectively call-by-reference. Java does this interesting thing that’s sort of a hybrid between pass-by-value and pass-by-reference. Basically, a parameter cannot be changed by the function, but the function can ask the parameter to change itself via calling some method within it.
avatar
athenakenji
Guru
Guru
Posts : 10
Join date : 2018-08-20

Passing an Array to a Method - Page 2 Empty Re: Passing an Array to a Method

Mon Aug 20, 2018 4:42 pm
example.

#include <stdio.h>
void disp( char ch)
{
printf("%c ", ch);
}
int main()
{
char arr[] = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'};
for (int x=0; x<10; x++)
{
/* I’m passing each element one by one using subscript*/
disp (arr[x]);
}

return 0;
}

Output:

a b c d e f g h i j
avatar
Admin
Admin
Posts : 11
Join date : 2018-08-07
Age : 25
https://rachellann.forumotion.com

Passing an Array to a Method - Page 2 Empty Re: Passing an Array to a Method

Wed Aug 22, 2018 4:24 pm
JUNGKOOK wrote:Does the basis in lecture are the things to identify the truth or lie?

you may use the lecture as your basis but you can also site or search on the internet . verygood question.


Last edited by Admin on Wed Aug 22, 2018 4:29 pm; edited 1 time in total
avatar
Admin
Admin
Posts : 11
Join date : 2018-08-07
Age : 25
https://rachellann.forumotion.com

Passing an Array to a Method - Page 2 Empty Re: Passing an Array to a Method

Wed Aug 22, 2018 4:28 pm
JUNGKOOK wrote:
Noob wrote:
Noob wrote:
Noob wrote:
Hyegi wrote:This is such a good post. I now understand the arrays. Looking forward to your future discussions.

can you site some examples Very Happy Very Happy

nakasearch ako sa youtube ng mga examples ng ganun napakaangas ka mo gusto mo mapanood>>?? Cool Cool

maangas kamo un pre napakaangas nung array kung paano siya nakokonekta sa data base para mas mabilis na mapaunlad ang sistema  Arrow Arrow

HAHAHAHAHA

continue watching examples in youtube. mas madaming examples dun. mas maiintindihan nyo ng malalim yung topic natin. very good.
Sponsored content

Passing an Array to a Method - Page 2 Empty Re: Passing an Array to a Method

Back to top
Permissions in this forum:
You cannot reply to topics in this forum