Program Menampilkan Nama dan Alamat Pada Java

Hoamzzzzz ngantuk ui, tapi buat satu postingan lagi ah,, tanggung,, hahahhahaa
Bismillah…

Program ini akan menerima masukkan dari keyboard dan menampilkannya kembali, langsung aja yo….

</pre>
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
 package javaapplication1;

/**
 *
 * @author toni
 */
 import java.util.Scanner;
 public class JavaApplication1 {
 public static void main(String[] args) {
 Scanner input = new Scanner (System.in);
 String nama;
 String alamat;
 System.out.print("Masukan nama anda : " );
 nama=input.nextLine();
 System.out.print("Masukkan Alamat anda : " );
 alamat=input.nextLine();
 System.out.println("Anda Memiliki nama "+ nama +" yang beralamat "+alamat );
 }
 }

print screnn hasil nya :

Screenshot from 2013-08-21 00:14:20

Advertisements

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