Blog Introductions
In this  blog contains tutorials about  HTML Tutorials, Python Tutorials, CSS Tutorials, How to, PHP Tutorials, Java Tutorials, C++ Tutorials, Tutorials,  Examples, Source code,Learning,
Tips and Software development  services. 
Java Functions and Passing parameter | Java tutorials Bestitworriors



Java Functions and Passing parameter

Java tutorials



Java Functions and Passing parameter | Java tutorials Bestitworriors - Function are the block of code that execute when it called.You can also pass one or more then one parameters to the function.Function perform various function .Function write once and can be use multipule time in the code.Function declare with return type and function name and then brackets.We can make static function in java.



Some Key Points of Java Functions



  1. A block of code that execute when it is called
  2. Function write once and can be used or called multiple time
  3. You can pass one or more parameters to the function
  4. Function can return the result or value
  5. Functon can be static function
  6. Function can't run without calling it

Code



public


class Functionss {

static void myMethod() {
System.out.println("Best it worrior is best platform");
}

static void myMethod(String fname) {
System.out.println(fname + " Member");
}
static int plusMethodInt(int x, int y) {


return x + y;
}

public
static
void
main(String[]
args) {

myMethod();
myMethod("adil");
myMethod("akil");
myMethod("ameer");
int
myNum1 = plusMethodInt(8, 5);
System.out.println(myNum1);
}
}




OutPut


Best it worrior is best platform
adil Member
akil Member
ameer Member
13



I hope You really enjoyed this blog . I try my best to make every thing is easy and helpfull to provide to public .You will get more blog about the Programing project and code . Thanks for visiting my blog if you have any querry related to this you can comment here i will try my best to response you back about Java Functions and Passing parameter | Java tutorials Bestitworriors