Created
September 4, 2020 19:11
-
-
Save mrnirva/4f6b5b5d5ee472bab9ff99a3de435144 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package metotlar; | |
public class Metotlar { | |
public static void main(String[] args) { | |
// Parametre Alan ve Değer Döndüren Metot | |
System.out.println(karesiniAl(12)); | |
} | |
/* | |
Parametre olarak int tipinde sayi isimli değişken verdik | |
Geriye değer döndürme kısmında kareyi hesaplayıp | |
return ile döndürdük. | |
*/ | |
static int karesiniAl(int sayi){ | |
int karesi = sayi * sayi; | |
return karesi; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment