This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$server = "localhost"; | |
$user = "root"; | |
$password = ""; | |
$nama_database = "pendaftaran_siswa"; | |
$db = mysqli_connect($server, $user, $password, $nama_database); | |
if( !$db ){ | |
die("Gagal terhubung dengan database: " . mysqli_connect_error()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package youtube_downloader; | |
import java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import java.net.URL; | |
import java.net.URLConnection; | |
import javax.swing.JOptionPane; | |
import org.json.JSONException; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.swing.*; | |
import java.awt.*; | |
import java.awt.event.*; | |
public class Login{ | |
String Username = "rahandi"; | |
String Password = "rahandi"; | |
String msg = " "; | |
JTextField txtUsername = null; | |
JTextField txtPassword = null; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Pong; | |
import java.awt.Color; | |
import java.awt.Graphics; | |
import java.util.Random; | |
public class Ball | |
{ | |
public int x, y, width = 25, height = 25; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Account{ | |
private int pin; | |
private double totalBalance; | |
public Account(int thePin, double thetotalBalance){ | |
pin = thePin; | |
totalBalance = thetotalBalance; | |
} | |
public boolean validatePIN(int userPIN){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ATM | |
{ | |
private boolean userAuthenticated; | |
private int currentAccountNumber; | |
private Screen screen; | |
private Keypad keypad; | |
private CashDispenser cashDispenser; | |
private DepositSlot depositSlot; | |
private BankDatabase bankDatabase; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class DaftarGaji { | |
private Pegawai[] listPegawai; | |
private int jumlahPegawaiSekarang = 0; | |
public DaftarGaji(int jumlah_pegawai){ | |
listPegawai = new Pegawai[jumlah_pegawai]; | |
} | |
public void addPegawai(Pegawai p){ | |
listPegawai[jumlahPegawaiSekarang] = p; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Siswa { | |
public static void main() { | |
Student siswanya = new Student(); | |
String nama; | |
nama = siswanya.getName(); | |
System.out.println(nama); | |
siswanya.printGrade(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MainClass { | |
public static void main(String[] args){ | |
MyClass t = new MyClass(0); | |
t.info(); | |
t.info("Overloaded method"); | |
new MyClass(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Circle { | |
private double radius; | |
private String color; | |
public Circle(){ | |
radius = 1.0; | |
color = "merah"; | |
} | |
public Circle(double r){ |
NewerOlder