Created
September 20, 2013 15:48
-
-
Save omerhakanbilici/6639602 to your computer and use it in GitHub Desktop.
Android 101 - Geleceği Yazanlar - Turkcell
This file contains hidden or 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 com.omerhakanbilici; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.Stack; | |
/** | |
* Created with IntelliJ IDEA. | |
* User: omerhakanbilici | |
* Date: 20.09.2013 | |
* Time: 17:24 | |
* To change this template use File | Settings | File Templates. | |
*/ | |
public class Main { | |
public static void main(String[] args){ | |
//1. soru | |
System.out.println("************ 1. soru"); | |
int[] int_array = new int[31]; | |
for (int i=0; i<30; i++) { | |
int_array[i] = i + 1; | |
} | |
System.out.println(int_array[30]); | |
//2. soru | |
System.out.println("************ 2. soru"); | |
System.out.println(50%7); | |
//3. soru | |
System.out.println("************ 3. soru"); | |
float[] ondalikli = new float[1]; | |
System.out.println(ondalikli[0]); | |
//4. soru | |
System.out.println("************ 4. soru"); | |
int[] array1 = new int[10]; | |
int[] array2 = {1,2,3,4}; | |
System.out.println(array1.length * array2[2]); | |
//5. soru | |
System.out.println("************ 5. soru"); | |
List<String> list = new ArrayList<String>(); | |
list.add("Ahmet"); | |
list.add("Ozan"); | |
list.add("Eda"); | |
list.add("Ahu"); | |
for (int i=0; i<list.size(); i=i+2) { | |
list.remove(i); | |
} | |
for (String str : list) { | |
System.out.println(str); | |
} | |
//6. soru | |
//int transient; | |
//7. soru | |
System.out.println("************ 7. soru"); | |
int a = 2; int b = 3; int c = ++b; int d = a++; | |
System.out.println("a : " + a); | |
System.out.println("b : " + b); | |
System.out.println("c : " + c); | |
System.out.println("d : " + d); | |
//8. soru Box sınıfında | |
//9. soru yorum sorusu. :) | |
//10. soru | |
// public class Stack <E> extends java.util.Vector<E> | |
// public class Vector <E> extends java.util.AbstractList<E> implements java.util.List<E> | |
//11. soru | |
//integer yanlis; | |
//12. soru | |
Integer birJavaSinifidir; | |
//13. soru | |
Object objectOrientedProgramming; | |
//14. soru | |
System.out.println("************ 14. soru"); | |
Integer aa = new Integer(1); | |
Integer bb = new Integer(1); | |
System.out.println(a == b); //false | |
//16. soru | |
System.out.println("************ 16. soru"); | |
int[] array11 = new int[10]; | |
int[] array22 = {1,2,3,4,5}; | |
//System.out.println(array11.length * array22[5]); | |
//17. soru | |
System.out.println("************ 17. soru"); | |
int toplam = 0; | |
int i; | |
for (i = 0; i < 5; i++) { | |
toplam += i; | |
} | |
System.out.println(toplam); | |
//18. soru | |
System.out.println("************ 18. soru"); | |
int cc = 0; | |
while (cc < 10) { | |
System.out.println(cc); | |
if (cc * 2 == 10) | |
break; | |
cc++; | |
} | |
//20. soru | |
System.out.println("************ 20. soru"); | |
int toplamm = 0; | |
int ii; | |
for (ii=0; ii<5; ii++) { | |
if(ii == 3) | |
break; | |
toplamm += ii; | |
} | |
System.out.println(toplamm); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
iyi günler hocam