From d615485e236ea30e366f567063e8fcef2efc577a Mon Sep 17 00:00:00 2001 From: abdiwaliolad Date: Mon, 22 Oct 2018 16:22:22 -0700 Subject: [PATCH] method-with-two-parameters --- src/PracticeStrings.java | 13 +++++++++++++ src/Receipt.java | 15 +++++++++++++++ src/mon24Assignment.java | 30 ++++++++++++++++++++++++++++++ 3 files changed, 58 insertions(+) create mode 100644 src/PracticeStrings.java create mode 100644 src/Receipt.java create mode 100644 src/mon24Assignment.java diff --git a/src/PracticeStrings.java b/src/PracticeStrings.java new file mode 100644 index 0000000..71bc109 --- /dev/null +++ b/src/PracticeStrings.java @@ -0,0 +1,13 @@ +/*file name : Test.Java + * Author:Abdiwali Olad + * 9.26.2018 + */ +public class PracticeStrings { + + public static void main(String[] args) { + // print with escape sequences + System.out.println("This program prints a"); + + } + +} diff --git a/src/Receipt.java b/src/Receipt.java new file mode 100644 index 0000000..08c9d63 --- /dev/null +++ b/src/Receipt.java @@ -0,0 +1,15 @@ + +public class Receipt { + + public static void main(String[] args) { + int x = 5; + x = 5 *9; + System.out.println(x); + + + + + + } + +} diff --git a/src/mon24Assignment.java b/src/mon24Assignment.java new file mode 100644 index 0000000..eea779a --- /dev/null +++ b/src/mon24Assignment.java @@ -0,0 +1,30 @@ +/* + * Projact name: Season with two parameter method + * Date: 10.22.2018 + * Author: Abdiwali M Olad + */ + + + +public class mon24Assignment { + + public static void main(String[] args) { + + int result; // defin the variable name as int result + + result = season(10, 5); // result now is called function method pass by + // two parameters + + System.out.print(result); // called system out to print out the result + // in to the console. + + } + + public static int season(int x, int y) { // creating method and defin to + // parameters integers + + return x + y; // return x and y + + }// end of the method + +}//end class