This file contains hidden or 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 java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.Random; | |
import java.util.Scanner; | |
/** |
This file contains hidden or 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
/* | |
* To change this template, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
import java.sql.Connection; | |
import java.sql.DriverManager; | |
import java.sql.SQLException; | |
/** |
This file contains hidden or 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
#Steps to install latest Laravel, LEMP on AWS Ubuntu 14.4 version. | |
This tutorial is the improvised verision of this [tutorial on Digitalocean](https://www.digitalocean.com/community/tutorials/how-to-install-laravel-with-an-nginx-web-server-on-ubuntu-14-04) based on my experience. | |
## Install PHP 7 on Ubuntu | |
Run the following commands in sequence. | |
``` | |
sudo apt-get install -y language-pack-en-base | |
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php | |
sudo apt-get update | |
sudo apt-get install zip unzip |
This file contains hidden or 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 java.util.*; | |
import java.io.*; | |
public class PhoneBook { | |
public static void main(String[] args) { | |
Scanner reader = new Scanner(System.in); | |
Scanner contactNameReader = new Scanner(System.in); | |
Scanner contactNumberReader = new Scanner(System.in); | |
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in)); | |
ArrayList<Contact> contacts = new ArrayList<>(); |
This file contains hidden or 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 java.util.*; | |
import java.io.*; | |
public class IndexPrestasiSiswa { | |
public static void main(String[] args) { | |
Scanner reader = new Scanner(System.in); | |
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in)); | |
ArrayList<String> courses = new ArrayList<>(); | |
ArrayList<String> courseNames = new ArrayList<>(); |
This file contains hidden or 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 java.util.Arrays; | |
public class ExampleDuplicateArray { | |
public static void main(String[] args) { | |
int[] source = {1,2,3,4,5,6,7,8,9}; | |
int[] source1 = {1,2,3}; | |
int[] destination = null; | |
System.out.println("Source array = " + Arrays.toString(source)); | |
This file contains hidden or 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 java.util.Scanner; | |
public class Calculator { | |
double x; | |
double y; | |
double result; | |
int Operation; | |
public static void main(String[] args) { |
This file contains hidden or 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 java.util.Scanner; | |
import java.util.Calendar; | |
class Movie { | |
public static void main(String args[]) { | |
Scanner reader = new Scanner(System.in); | |
Integer currentYear = Calendar.getInstance().get(Calendar.YEAR); | |
System.out.print("Masukan nama anda : "); |
This file contains hidden or 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 java.util.Scanner; | |
class MakeSquare { | |
public static void main(String args[]) { | |
Scanner reader = new Scanner(System.in); | |
int a, b, c; | |
System.out.print("Masukan angka = "); |
This file contains hidden or 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 java.util.Scanner; | |
public class Number { | |
public static void main(String[] args) { | |
Scanner reader = new Scanner(System.in); | |
System.out.print("Masukkan angka pertama: "); | |
long a = Integer.parseInt(reader.nextLine()); | |
System.out.print("Masukkan angka kedua: "); | |
long b = Integer.parseInt(reader.nextLine()); | |
System.out.println("Bilangan terbesar: " + Math.max(a, b)); |