// string_charat.jsl public class Program { public static void main(String[] args) { String str = "Hello, World!"; // Get the character at positions 0 and 12. int index1 = str.charAt(0); int index2 = str.charAt(12); // Print out the results. System.out.println("The character at position 0 is " + (char)index1); System.out.println("The character at position 12 is " + (char)index2); } } /* Output: The character at position 0 is H The character at position 12 is ! */
Selasa, 13 Maret 2012
java.lang.String.charAt(int index)
Langganan:
Posting Komentar (Atom)
Chord The Day's Of Father-Superman Is Dead
Intro: G5 . . . . E5 4x E5 B5 E5 B5 A5 B5 C5 D5 E5 E5 B5 E5 B5 A5 B5 C5 E5 B5 E5 B5 A5 B5 C5 D5 E5 2x E5 When the morning comes to spot...
-
Kali ini aku mau sharing tentang cara memanipulasi data di Array :D. Jadi Array adalah sekelompok variabel yang memiliki nama sama. Setiap ...
-
-setelah user memasukkan inputan : 1-program me-Looping utk mncari input yg dimasukkan user itu index ke berapa. 2-setelah di ketahui "...
mana isi nya.......?
BalasHapuswhat the heck.....?