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 S1 = "Harun.xyz"; | |
byte sayi1 = 0; | |
short sayi2 = 25; |
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 S1 = "Harun.xyz"; | |
byte sayi1 = 0; | |
short sayi2 = 25; |
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 S1 = "Harun.xyz"; | |
System.out.printf("%s \n",S1); | |
System.out.printf("%15s \n",S1); // 15 hane sağa yanaşık |
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 stringolusturma; | |
public class StringSinifi { | |
public static void main(String[] args) { | |
String S1 = "merhaba_dunya@gmail.com"; | |
if(S1.endsWith("@gmail.com")){ | |
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 stringolusturma; | |
public class StringSinifi { | |
public static void main(String[] args) { | |
// copyValueOf() Char Dizinin İstenilen Kısmını Stringe Dönüştürür | |
char[] charArray = {'M','E','R','H','A','B','A'}; | |
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 stringolusturma; | |
public class StringSinifi { | |
public static void main(String[] args) { | |
// toCharArray() Stringin Her Harfini Char Dizisine Aktarır | |
String S1 = "Merhaba Dünya"; | |
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 stringolusturma; | |
public class StringSinifi { | |
public static void main(String[] args) { | |
// İlgili veri tiplerinin sınıf metotları ile | |
// Stringi o veri tiplerine dönüştürebiliriz | |
String S1 = "25"; |
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 stringolusturma; | |
public class StringSinifi { | |
public static void main(String[] args) { | |
// String.valueOf metodu sayısal, karakter, object bir veriyi Stringe dönüştürür | |
String S1 = ""; | |
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 stringolusturma; | |
public class StringSinifi { | |
public static void main(String[] args) { | |
// substring bize metnin hedeflediğimiz kısmını verir | |
// ilk indis dahildir, son indis dahil değildir | |
// Yani son indisteki karakteri göz önüne almaz | |
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 stringolusturma; | |
public class StringSinifi { | |
public static void main(String[] args) { | |
// replace() ilk parametresi hedef kelime | |
// ikinci parametresi yeni kelime olarak doldurulur | |
String S1 = "Merhaba Dünya Nasılsın? "; |