“Exploring The Codes: Function and Parameter Passing”

        Content:  In the society today, function and parameter passing is part of coding. They explore the functions how it to organize and structure the task in the program. The aspects of each developer is to make the code efficient and reusable in the concept of computer programming or in any other software. In this blog, you may know the meanings, purpose of each function into programming languages in Java.

    

                                                            VIDEO LINK: PPT VIDEO

                  First, we need to know the meaning of Function, by defining functions it can use to organize the programs efficiently and can improve readability, it helps how to make it easier to understand and maintain the alignments in code. They are two types of Functions in Programming  

(Pre – Defined Functions and User Defined Functions). 

Pre – Defined Functions means naming a specific syntax is easy to integrate the different projects, it can directly use in Java programs without having to implement the functions. Because they provide proper shortcuts in every code of program, based on their needs.  

For example: 

public class Functions {
   / Pre - Defined Functions

      String name = "Yiamie";
    int length = name.length(); // Returns the length of the string
    String upperCase = name.toUpperCase(); // Converts the string to uppercase
    String lowerCase = name.toLowerCase(); // Converts the string to lowercase
}

  Description:  It has a string name “Yiamie” in the example above, In this methods like length () to find the length of a string, to UpperCase() to convert a string to uppercase, and to LowerCase() to convert a string to lowercase.

User Defined Functions means it created by own programmers, set of instructions that can be invoked repeatedly, to define their own customized operations to be used repeatedly of coding program. It used multiple times depends on the application you need to use.

public class Functions1 {
     // User Defined Functions
    public static void main (String[]args){

         int mul1 = 18;
         int mul2 = 19;
         int product = multiply (mul1,mul2);
         System.
public class Functions1 {
     // User Defined Functions
   
public static void main (String[]args){
         int mul1 = 18;
         int mul2 = 19;
      int product = multiply (mul1,mul2);

         System.out.println("Multiplication:  " + mul1 + " and " + mul2 + " is: " + product);
     }
    public static int multiply (int mul1,int mul2){

         return mul1 * mul2;
    }
    }

Description: The multiply function takes two integer parameters and returns their product, which is then displayed in the main method.                                                         


Value Returning Functions means that it retuns the code or process the data to perform the operations of specific return type.

SYNTAX:  Modifiers returnType methiodName (formal parameter list){

statement(s)

return expression;   }  

Void Functions means that it not returns the code of complete without a providing result  in functions it performs operation but not returning the exact value of code.

SYNTAX : Modifies void methodName (formal parameter list) {

statement(s)  }


Parameter Passing it defined function to correct the ordering inputs of proper execution in specific values in function.

By exploring each functions it allows to take full advantage of developers by mastering the codes to have a better understanding and good efficient of coding to know the good features of work.

Comments

  1. Replies
    1. Thank you for noting that I already edited the spacing and it helped to make the alignment of the blog posts good.

      Delete
  2. Hello!, your blog looks great but the writing format looks confusing

    ReplyDelete
    Replies
    1. Thank you for letting me know that you are confusing on my blog, I already edit it and do my best to understand the details in the coding I did.

      Delete
  3. I suggest adding a reference to the topic. 

    ReplyDelete
    Replies
    1. I will try to find the reference to better understand the details posted in my blog, thanks for your suggestion

      Delete
  4. The topic of your blog is very enjoyable to read, good job!

    ReplyDelete
    Replies
    1. I really appreciate it that you enjoyed reading my blog about coding.

      Delete
  5. The topic of your content is very helpul, and i enjoyed reading it

    ReplyDelete

Post a Comment