Created
September 3, 2020 16:38
-
-
Save mrnirva/edd922ce9ef0ff04efed3067fe257216 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) { | |
// Kaynak ve Hedef array oluşturuldu | |
String[] kaynak = {"Ali","Ata","Bak"}; | |
String[] hedef = new String[3]; | |
// Kaynak Array Seçildi | |
// Kopyalamanın başlayacağı indis belirlendi | |
// Hedef Array Seçildi | |
// Hedef Array'e yapıştırmanın başlayacağı indis seçildi | |
// Kaç bileşen kopyalanacak seçildi | |
System.arraycopy(kaynak, 0, hedef, 0, 3); | |
// For-each ile yazdırdık | |
for(String bilesen : hedef){ | |
System.out.println(bilesen); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment