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
Public Class Form1 | |
Private Sub btnUboundResult1_Click(sender As Object, e As EventArgs) Handles btnUboundResult1.Click | |
Dim dizi(4) As String | |
MessageBox.Show(UBound(dizi)) | |
End Sub | |
Private Sub btnUboundResult2_Click(sender As Object, e As EventArgs) Handles btnUboundResult2.Click | |
Dim dizi(4, 6) As String | |
MessageBox.Show(UBound(dizi, 2)) |
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
public class SubstringExample1 { | |
public static void main(String[] args){ | |
String yaziString = new String("Merhaba Dünya"); | |
char yaziChar = yaziString.charAt(9); | |
String subsitringDeger = yaziString.substring(8); | |
System.out.println(subsitringDeger); | |
} | |
} |
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
public class ReplaceExample { | |
public static void main(String[] args){ | |
String yazi= "merhaba dünya"; | |
System.out.println(yazi.replace("r","s")); | |
System.out.println(yazi.replace("merhaba","hello")); | |
} | |
} |
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
public class EqualsExample { | |
public static void main(String[] args){ | |
String yazi = "Merhaba Can Okay"; | |
Boolean durum1= yazi.equals("Merhaba Can Okay"); // true | |
System.out.println(durum1); | |
Boolean durum2 = yazi.equals("merhaba can okay"); //false | |
System.out.println(durum2); | |
Boolean durum3 = yazi.equalsIgnoreCase("merhaba can okay");//true | |
System.out.println(durum3); | |
} |
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
public class uygulama7 { | |
public static void main(String[] args){ | |
String yazi= "Merhaba canokay"; | |
String [] yazilar = yazi.split(" "); | |
System.out.println(yazilar[0]); | |
System.out.println(yazilar[1]); | |
} | |
} |
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
public class SwitchCaseExample_1 { | |
public static void main(String[] args) { | |
//Secilen ay degeri | |
int ayDegeri = 7; | |
//Yazdirilacak ay degeri | |
String ayDegeriStr = null; | |
//switch - case ile hanig ayın hangi sayıya denk geldiginin belirtildigi bolum | |
switch (ayDegeri) { | |
case 1: | |
ayDegeriStr = "Ocak"; |
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
import java.util.Scanner; | |
public class ScannerExample_1 { | |
public static void main(String args []){ | |
Scanner input= new Scanner(System.in); | |
System.out.print("Lütfen mesaj giriniz: "); | |
String mesaj = input.nextLine(); | |
System.out.println("Girilen mesaj: " + mesaj); | |
} | |
} |
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
public class ForExample { | |
public static void main(String[] args) { | |
for (int i = 0; i < 10; i++) { | |
for (int j = 0; j < 10; j++) { | |
System.out.println(i + "*" + j + " = " + i * j); | |
} | |
System.out.println(); | |
} | |
} | |
} |
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
import java.util.Scanner; | |
public class WhileExample { | |
public static void main(String[] args) { | |
int toplam=0; | |
System.out.println("Lütfen 5 sayi giriniz: "); | |
Scanner s=new Scanner(System.in); | |
int i=1; | |
while (i<6) { | |
System.out.println(i+". sayiyi giriniz: "); | |
int sayi=s.nextInt(); |
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
public class DoWhileExample { | |
public static void main(String[] args) { | |
int toplam=0; | |
int i=0; | |
do{ | |
if(i%2==0){ | |
toplam+=i; | |
} | |
i++; | |
}while(i<=10); |