DEV Community

Cing Sian Dal
Cing Sian Dal

Posted on

Formal parameter and Actual parameter ဆိုတာ

Formal parameter (parameter) ဆိုတာ subroutine (method) definition မှာ ပေးထားတဲ့ နာမည်ကို ဆိုလိုတာ။

static void function foo(int bar){}
Enter fullscreen mode Exit fullscreen mode

ဒီနေရာမှာ bar ဆိုတာက formal parameter (parameter) လို့ခေါ်ပါတယ်။

Actual parameter (argument) ဆိုတာက subroutine (method) ရဲ့ parameter ထဲမှာ ထည့်သွင်းလိုက်တဲ့ ဒေတာကို ဆိုလိုတာ။

static void function foo(int bar){
   System.out.println(bar);
}
public static void main([] args){
   foo("Hello World");
}
Enter fullscreen mode Exit fullscreen mode

ဒီနေရာမှာ foo အတွင်းမှာ ထည့်လိုက်တဲ့ ဒေတာ Hello World ဆိုတာ actual parameter (argument) ဖြစ်ပါတယ်။

Top comments (0)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay