Share
Go down
Guru
Guru
Posts : 10
Join date : 2018-08-20
View user profile

Re: Passing an Array to a Method

on 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
Guru
Guru
Posts : 10
Join date : 2018-08-20
View user profile

Re: Passing an Array to a Method

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

Re: Passing an Array to a Method

on 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.
Guru
Guru
Posts : 10
Join date : 2018-08-20
View user profile

Re: Passing an Array to a Method

on 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.
Guru
Guru
Posts : 10
Join date : 2018-08-20
View user profile

Re: Passing an Array to a Method

on 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
Admin
Posts : 11
Join date : 2018-08-07
Age : 19
View user profilehttp://rachellann.forumotion.com

Re: Passing an Array to a Method

on 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
Admin
Posts : 11
Join date : 2018-08-07
Age : 19
View user profilehttp://rachellann.forumotion.com

Re: Passing an Array to a Method

on 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

Re: Passing an Array to a Method

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