Menghitung Karakter

import java.io.*;

/**

*

* @author root

*/

public class Main {

/**

* @param args the command line arguments

*/

public static void main(String[] args) {

String str = “unitomo”;

String c = “2008″;

String s = ” “;

int panjang;

panjang = “unitomo “.length();

System.out.println(”Variabel str:”+str);

System.out.println(”Variabel c:”+c);

System.out.println(”Variabel s:”+s);

System.out.println(”jumlah alphabet :”+str.length());

System.out.println(”jumlah angka :”+c.length());

System.out.println(”jumlah spasi :”+s.length());

// TODO code application logic here

}

}

Tinggalkan sebuah Komentar

Belum ada komentar.

Komentar RSS Lacak Balik URI Pengenal

Tinggalkan Balasan

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 / Ubah )

Twitter picture

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

Facebook photo

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

Connecting to %s

Ikuti

Get every new post delivered to your Inbox.