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 LatihanArray002{ | |
public static void main(String[]amirul){ | |
int[] myArray; | |
myArray = new int[5]; | |
myArray[0] = 14; | |
myArray[1] = 7; | |
myArray[2] = 2; | |
myArray[3] = 5; | |
myArray[4] = 9; | |
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 LatihanArray001{ | |
public static void main(String[]amirul){ | |
//Contoh untuk menyimpan data array 2D yang bertipe integer yang terdiri dari 2 baris 3 kolom: | |
int[ ][ ] dataku = new int[2][3]; | |
dataku[0][0] = 12; | |
dataku[0][1] = 25; | |
dataku[0][2] = 4; | |
dataku[1][0] = 81; | |
dataku[1][1] = 34; | |
dataku[1][2] = 7; |
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 ProgramInputOutput { | |
public static void main(String[] args) { | |
System.out.println("HELLO WORLD..."); | |
} | |
} |
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
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package ga.turbin; | |
import java.util.ArrayList; | |
import javafx.application.Application; | |
import javafx.collections.FXCollections; |
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
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package ga.turbin; | |
import javafx.beans.property.DoubleProperty; | |
import javafx.beans.property.IntegerProperty; | |
import javafx.beans.property.SimpleDoubleProperty; |
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 ga.turbin; | |
public class Chromosome { | |
//input | |
int n_baris; | |
int n_kolom; | |
double uo; | |
private int[] n_turbin_col; | |
public int n_turbin; |
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
IDE JAVA : | |
Netbeans : | |
https://netbeans.org/downloads/ | |
Eclipse : | |
http://www.eclipse.org/downloads/ | |
IntelliJ IDEA : | |
http://www.jetbrains.com/idea/download/ |
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 latihan4; | |
import java.awt.Color; | |
import java.awt.EventQueue; | |
import java.awt.Font; | |
import java.awt.Graphics; | |
import java.awt.Graphics2D; | |
import java.awt.font.TextAttribute; | |
import java.text.AttributedString; | |
import javax.swing.JComponent; |
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 latihan3; | |
import java.awt.Color; | |
import java.awt.EventQueue; | |
import java.awt.Font; | |
import java.awt.Graphics; | |
import java.awt.Graphics2D; | |
import java.awt.font.TextAttribute; | |
import java.text.AttributedString; | |
import javax.swing.JComponent; |
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 latihan1; | |
import java.awt.Color; | |
import java.awt.EventQueue; | |
import java.awt.Graphics; | |
import java.awt.Graphics2D; | |
import javax.swing.JComponent; | |
import javax.swing.JFrame; | |
public class Main extends JFrame { |