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> | |
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 com.google.gson.Gson; | |
import com.google.gson.GsonBuilder; | |
import org.apache.http.HttpResponse; | |
import org.apache.http.client.HttpClient; | |
import org.apache.http.client.methods.HttpGet; | |
import org.apache.http.impl.client.HttpClientBuilder; | |
import java.io.BufferedReader; | |
import java.io.InputStreamReader; |
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 com.cleancode.trycatchclean; | |
import java.net.MalformedURLException; | |
import java.net.URL; | |
public class DirtyMain { | |
public static void main(String[] args) throws MalformedURLException { | |
final URL dashboard = new URL("http://dashboard"); |
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
class Volume{ | |
public static void main(String args[]){ | |
Box b = new Box(5,5,5); | |
System.out.println(b.volume); | |
} | |
} | |
class Box { | |
public int volume; | |
Box(int length, int width, int height){ |
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
(Facade) Langkah pembuatan : | |
1. Interface LaptopShop.java | |
2. Asus.java, Lenovo.java, Acer.java | |
3. Facade Class ShopKeeper.java | |
4. FacadePatternClient.java |
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
(Factory) Langkah Pembuatan: | |
1. Interface BangunDatar.java | |
2. Persegi.java dan Lingkaran.java | |
3. BangunDatarFactory.java | |
4. BangunDatarFactoryDemo.java |
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
(Singleton) Langkah Pembuatan : | |
1. Cookies.java | |
2. CookiesDemo.java |
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
(Adapter) Langkah Pembuatan : | |
1. Interface Bird.java dan ToyDuck.java | |
2. Class Sparrow.java dan PlasticToyDuck.java | |
3. BirdAdapter.java | |
4. AdapterClient.java |
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
(Observer) Langkah pembuatan : | |
1. Subject.java | |
2. Abstract Observer.java | |
3. BinaryObserver.java, OctalObserver.java, dan HexaObserver.java |
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
(MVC) Langkah pembuatan : | |
1. Student.java | |
2. StudentView.java | |
3. StudentController.java | |
4. MVCPatternDemo.java |
OlderNewer