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
| public class ProgramJavaPertama { | |
| public static void main(String[] args) { | |
| System.out.println("Hello World"); | |
| } | |
| } |
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.awt.Color; | |
| import java.awt.Graphics; | |
| import java.awt.Graphics2D; | |
| import javax.swing.JComponent; | |
| public class Canvas extends JComponent { | |
| public void paint(Graphics g) { | |
| Graphics2D g2d = (Graphics2D) g; | |
| g2d.setColor(Color.decode("#f1c40f")); |
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.awt.EventQueue; | |
| import javax.swing.JFrame; | |
| public class Main extends JFrame { | |
| public Main(){ | |
| initUI(); | |
| } |
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.awt.Point; | |
| public class SoalProgramming { | |
| int findMeetingPlace(Point[] houseLocations, Point kakekHouse, int D){ | |
| int meetingPlace=-1; | |
| double MIN = Double.MAX_VALUE; | |
| for(int i=0;i<houseLocations.length;i++){ | |
| Point kandidat = houseLocations[i]; | |
| int jarakKandidatKekakekHouse = Math.max(Math.abs(kakekHouse.x-kandidat.x), Math.abs(kakekHouse.y-kandidat.y));//jarak kandidat kerumah kakek |
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.awt.BasicStroke; | |
| import java.awt.BorderLayout; | |
| import java.awt.Color; | |
| import java.awt.Graphics; | |
| import java.awt.Graphics2D; | |
| import javax.swing.JComponent; | |
| import javax.swing.JFrame; | |
| import javax.swing.JPanel; | |
| import javax.swing.SwingUtilities; |
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.awt.BasicStroke; | |
| import java.awt.BorderLayout; | |
| import java.awt.Color; | |
| import java.awt.Graphics; | |
| import java.awt.Graphics2D; | |
| import javax.swing.JComponent; | |
| import javax.swing.JFrame; | |
| import javax.swing.JPanel; | |
| import javax.swing.SwingUtilities; |
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.awt.BorderLayout; | |
| import java.awt.Color; | |
| import java.awt.Graphics; | |
| import java.awt.Graphics2D; | |
| import javax.swing.JComponent; | |
| import javax.swing.JFrame; | |
| import javax.swing.JPanel; | |
| import javax.swing.SwingUtilities; |
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.awt.BorderLayout; | |
| import java.awt.Color; | |
| import java.awt.Graphics; | |
| import java.awt.Graphics2D; | |
| import javax.swing.JComponent; | |
| import javax.swing.JFrame; | |
| import javax.swing.JPanel; | |
| import javax.swing.SwingUtilities; |
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.awt.BorderLayout; | |
| import java.awt.Color; | |
| import java.awt.Graphics; | |
| import java.awt.Graphics2D; | |
| import javax.swing.JComponent; | |
| import javax.swing.JFrame; | |
| import javax.swing.JPanel; | |
| import javax.swing.SwingUtilities; |
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.awt.BorderLayout; | |
| import java.awt.Color; | |
| import java.awt.Graphics; | |
| import java.awt.Graphics2D; | |
| import javax.swing.JComponent; | |
| import javax.swing.JFrame; | |
| import javax.swing.JPanel; | |
| import javax.swing.SwingUtilities; |