0% found this document useful (0 votes)
94 views3 pages

Modul 2

The document contains Java code for four classes: Pertama, Dua, Tiga, and Tugas. Pertama prints a welcome message, Dua displays personal biodata, Tiga lists academic programs at STIMIK AKAKOM, and Tugas collects user input to display personal biodata. Each class includes a main method that executes the respective print statements or input prompts.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
94 views3 pages

Modul 2

The document contains Java code for four classes: Pertama, Dua, Tiga, and Tugas. Pertama prints a welcome message, Dua displays personal biodata, Tiga lists academic programs at STIMIK AKAKOM, and Tugas collects user input to display personal biodata. Each class includes a main method that executes the respective print statements or input prompts.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd

Pertama:

public class Pertama {


public static void main(String args[])
{
[Link]("Selamat Datang di STIMIK AKAKOM");
}
}
Output:
Selamat Datang di STIMIK AKAKOM
Press any key to continue . . .

Dua:
public class Dua {
public static void main(String args[])
{
[Link](" BIODATA PRIBADI");
[Link]("======================================");
[Link]("Nama : Mukhammad Luthfi Widiatmoko");
[Link]("NIM : 095410172");
[Link]("Jurusan : Teknik Informatika");
}
}
Output:
BIODATA PRIBADI
======================================
Nama : Mukhammad Luthfi Widiatmoko
NIM : 095410172
Jurusan : Teknik Informatika
Press any key to continue . . .

Tiga:
public class Tiga {
public static void main(String args[])
{
[Link]("STIMIK AKAKOM YOGYAKARTA");
[Link]("Jl. Raya Janti 143");
[Link]("=====================");
[Link]("Program Studi");
[Link]("1. Teknik Informatika / S1");
[Link]("2. Sistem Informatika / S1");
[Link]("3. Manajemen Informasi / D3");
[Link]("4. Teknik Komputer / D3 ");
[Link]("5. Komputerisasi Akuntansi / D3");
[Link]("");
[Link]("STIMIK AKAKOM YOGYAKARTA");
[Link](" Yang Pertama Dan Utama");
}
}
Output:
STIMIK AKAKOM YOGYAKARTA
Jl. Raya Janti 143
=====================
Program Studi
1. Teknik Informatika / S1
2. Sistem Informatika / S1
3. Manajemen Informasi / D3
4. Teknik Komputer / D3
5. Komputerisasi Akuntansi / D3

STIMIK AKAKOM YOGYAKARTA


Yang Pertama Dan Utama
Press any key to continue . . .

Tugas:
import [Link];
public class Tugas {
public static void main(String args[])
{
Scanner masuk = new Scanner([Link]);
String nama,nim,jur,tgl,sex,alamat,hobby;
[Link]("Masukkan Nama Anda :");
nama= [Link]();
[Link]("Masukkan No Mahasiswa Anda :");
nim= [Link]();
[Link]("Masukkan Jurusan Anda :");
jur= [Link]();
[Link]("Masukan Tanggal Lahir Anda :");
tgl= [Link]();
[Link]("Masukan Jenis Kelamin Anda :");
sex= [Link]();
[Link]("Masukkan Alamat Anda : ");
alamat= [Link]();
[Link]("Masukkan Hobby Anda :");
hobby= [Link]();
[Link]("");
[Link](" Biodata Pribadi");
[Link]("===============================");
[Link]("Nama = "+nama);
[Link]("No Mahasiswa = "+nim);
[Link]("Jurusan = "+jur);
[Link]("Tanggal Lahir = "+tgl);
[Link]("Jenis Kelamin = "+sex);
[Link]("Alamat = "+alamat);
[Link]("Hobby = "+hobby);
}
}
Output:
Masukkan Nama Anda :[Link] Widiatmoko
Masukkan No Mahasiswa Anda :095410172
Masukkan Jurusan Anda :TI
Masukan Tanggal Lahir Anda :!6 Desember 1991
Masukan Jenis Kelamin Anda :Laki-Laki
Masukkan Alamat Anda : Kepuh GK 3/1016
Masukkan Hobby Anda :Tidur

Biodata Pribadi
===============================
Nama = [Link] Widiatmoko
No Mahasiswa = 095410172
Jurusan = TI
Tanggal Lahir = !6 Desember 1991
Jenis Kelamin = Laki-Laki
Alamat = Kepuh GK 3/1016
Hobby = Tidur
Press any key to continue . . .

You might also like