Created
February 13, 2020 17:08
-
-
Save emirozturk/d296115f6e62fa1fe9c608c131334588 to your computer and use it in GitHub Desktop.
NYP 1. Hafta Uygulama
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 net.emirozturk; | |
public class Main { | |
static String sayiYaz(int sayi){ | |
if(sayi == 1)return "Bir"; | |
if(sayi == 2)return "İki"; | |
if(sayi == 3)return "Üç"; | |
return ""; | |
} | |
static String sayiYaz(String sayi){ | |
return sayiYaz(Integer.parseInt(sayi)); | |
} | |
public static void main(String[] args) { | |
System.out.println(sayiYaz("3")); | |
System.out.println(sayiYaz(3)); | |
} | |
} |
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 net.emirozturk; | |
public class Main { | |
static void fonk(){ | |
int[] dizi = new int[10];//var dizi = new int[10]; | |
for(int i=0;i<10;i++)dizi[i]=i; | |
for(int i=0;i<10;i++)System.out.println(dizi[i]); | |
for(int eleman in dizi)System.out.println((eleman)); | |
} | |
public static void main(String[] args) { | |
fonk(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment