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 arrayssinifi; | |
public class ArraysSinifi { | |
public static void main(String[] args) { | |
// Kaynak ve Hedef array oluşturuldu | |
String[] kaynak = {"Ali","Ata","Bak"}; | |
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 arrayssinifi; | |
public class ArraysSinifi { | |
public static void main(String[] args) { | |
String[] arrayim = {"Ali","Veli","Fatma"}; | |
for(String deger : arrayim){ | |
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 arrayssinifi; | |
public class ArraysSinifi { | |
public static void main(String[] args) { | |
String[] arrayim = {"Ali","Veli","Fatma"}; | |
// Döngüyle dizinin içerisindeki elemanları yazdırma | |
// i = 0 koşulu başlangıcı 0. indisten yap demek |
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 arrayssinifi; | |
public class ArraysSinifi { | |
public static void main(String[] args) { | |
String[] arrayim = {"Ali","Veli","Fatma"}; | |
System.out.println("Dizinin Boyutu: "+arrayim.length); | |
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 arrayssinifi; | |
public class ArraysSinifi { | |
public static void main(String[] args) { | |
// 1. Atama Şekli | |
// Önce Bildirme Sonra Oluşturma ve Değer Verme | |
// İkinci köşeli parantez dizinin kapasitesini belirler (4) | |
// Sonradan Değer Atamak |
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 arrayssinifi; | |
public class ArraysSinifi { | |
public static void main(String[] args) { | |
int[] arrayim; // Bildirim | |
arrayim = new int[4]; // Nesneyi oluşturma kısmı | |
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 tipdonusumu; | |
public class TipDonusumu { | |
public static void main(String[] args) { | |
// Küçük Tipten Büyük Tipe Döküm (Implicit Casting) | |
/* | |
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 ciktibicimleme; | |
public class CiktiBicimleme { | |
public static void main(String[] args) { | |
String sablon = "%5s %10s %10s %n"; | |
System.out.printf(sablon ,"Okul No","Vize","Final"); | |
System.out.printf(sablon ,"-------","-------","-------"); |
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 ciktibicimleme; | |
public class CiktiBicimleme { | |
public static void main(String[] args) { | |
float hesabimdakiMiktar = 1450f; | |
System.out.printf("%,f\n" ,hesabimdakiMiktar); | |
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 ciktibicimleme; | |
public class CiktiBicimleme { | |
public static void main(String[] args) { | |
float hesabimdakiMiktar = 14.9154f; | |
System.out.printf("%.2f \n" ,hesabimdakiMiktar); | |