RSS

menampilkan string perkarakter menggunakan array satu dimensi

03 May

package bangun.mandi.pergi;
import java.util.*;

public class menampilkan_karakter_satu_persatu_menggunakan_array_satu_dimensi{
public static void main(String[]bangun_mandi_pergi){
Scanner s=new Scanner(System.in);
System.out.print(“Masukan String Pertama : “);
String st1=s.next();
System.out.print(“Masukan String Kedua : “);
String st2=s.next();
System.out.print(“Masukan String Ketiga : “);
String st3=s.next();
String kal=st1.concat(st2).concat(st3);
System.out.println();
System.out.println();
char array[]=new char[50];
for(int i=0; i<kal.length(); i++){
System.out.println(“String Yang Akan Ditampilkan “+”["+i+"]“+” “+array[i]+” = “+kal.charAt(i));
}System.out.println();
System.out.println();
System.out.println();
}
}

 
Leave a comment

Posted by on May 3, 2011 in about me

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: