Program Sederhana Biodata Mahasiswa ( Java Basic )

Posted on Updated on


Hai-hai bagi programmer muda.. yang lagi sibuk nyari script program java, gak perlu bingung!! liat aja script ini..Semoga bermanfaat yaa!!
Hasil outputnya :

Berikut Sourcecodenya,

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author user
*/
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class javatugas {
public static void main(String[] args) {
// TODO code application logic here
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
int data =0;
String[] nama    = new String[30];
String[] nim     = new String[15];
String[] jurusan = new String[10];
String[] alamat  = new String[50];

System.out.println("BIODATA MAHASISWA");
System.out.println("+===============INPUTAN============================+");
try{
    System.out.println("Masukkan banyak data = ");
    data = Integer.parseInt(input.readLine());
    for (int a=1;a<=data;a++){
         System.out.println("------Data ke-"+ a +"------");
         System.out.println("Masukan Nim        = ");
            nim[a] = input.readLine();
         System.out.println("Masukan Nama       = ");
            nama[a] = input.readLine();
         System.out.println("Masukan Jurusan    = ");
            jurusan[a] = input.readLine();
         System.out.println("Masukan Alamat = ");
            alamat[a] = input.readLine();
     }
} catch (IOException e ){
  System.out.println("Error");
}

System.out.println("+==============HASIL OUTPUT========================+");
System.out.println("Banyak data : " + data);
for (int a=1; a<=data;a++){
    System.out.println("Data Mahasiswa ke- " + a);
    System.out.println("Nim     : "+ nim[a]);
    System.out.println("Nama    : "+ nama[a]);
    System.out.println("Alamat  : "+ alamat[a]);
    System.out.println("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
}
}
}

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