Last active
September 3, 2020 14:14
-
-
Save mrnirva/15e821a3e482c949b385b7bfd61fc1d1 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 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 | |
int[] arrayim; | |
arrayim = new int[4]; | |
arrayim[0] = 10; // 0. indise 10 değeri | |
// 2. Atama Şekli | |
// 3 İndisli bir dizi oluşturduk ve değerleri direkt atadık | |
int[] arrayim2; | |
arrayim2 = new int[]{5,10,15}; | |
// 3. Atama Şekli | |
// Oluşturma Anında Değer Atama | |
int[] arrayim3 = {1,3,5,7}; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment