Jav 5
Jav 5
ii
ath
aip
hM
a tes
nk
==============================================================
Ve
faq:
=>The partition of "Java Stack Area" where the method is copied for
==================================================================
*imp
define parameters?
=>Parameters are the variables which are used to transfer the data from
ii
one method to another method.
ath
=>Based on Parameters the methods are categorized into two types:
aip
(b)Methods with parameters.
hM
(a)Methods without parameters:
Ex:
DemoMethods1.java
a
nk
-----------------------------------------------------------
*imp
define return_type?
=>return_type will specify the method will return the value after
execution or not
(a)NonReturn_type methods
(b)Return_type methods
ii
ath
(a)NonReturn_type methods:
=>The methods which will not return any value after method execution
aip
are known as NonReturn_type methods.
Ex:
hM
DemoMethods1.java
=>The methods which are declared with "void" are known as NonReturn_type
methods.
tes
(b)Return_type methods:
a
nk
=>The methods which return the value after execution are known as
Return_type methods.
Ve
=>The methods which are declared witout "void" are known as Return_type
------------------------------------------------------------------
class Average
ii
float z = (float)(x+y)/2;
ath
return z;
aip
}
class DemoMethods2
hM
{
{
tes
System.out.println("Average="+res);
}
Ve
===================================================================
Assignment:
float per(s1,s2,s3,s4,s5,s6)
MainClass : DemoMethods3
==================================================================
ii
ath
aip
hM
a tes
nk
Ve