Created
October 16, 2011 03:48
-
-
Save khannedy/1290485 to your computer and use it in GitHub Desktop.
Membuat Interface dari Class Menggunakan NetBeans
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
| /* | |
| * Copyright (c) 2011, StripBandunk and/or its affiliates. All rights reserved. | |
| * | |
| * http://stripbandunk.com/ | |
| * | |
| * STRIPBANDUNK PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. | |
| */ | |
| package khannedy.belajar.belajarjava.netbeans; | |
| /** | |
| * | |
| * @author Eko Kurniawan Khannedy | |
| */ | |
| public interface Sample { | |
| String getNama(); | |
| void hello(); | |
| void sapa(String nama); | |
| } |
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
| /* | |
| * Copyright (c) 2011, StripBandunk and/or its affiliates. All rights reserved. | |
| * | |
| * http://stripbandunk.com/ | |
| * | |
| * STRIPBANDUNK PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. | |
| */ | |
| package khannedy.belajar.belajarjava.netbeans; | |
| /** | |
| * | |
| * @author Eko Kurniawan Khannedy | |
| */ | |
| public class SampleClass implements Sample { | |
| private String nama; | |
| @Override | |
| public String getNama() { | |
| return nama; | |
| } | |
| public void setNama(String nama) { | |
| this.nama = nama; | |
| } | |
| @Override | |
| public void hello() { | |
| System.out.println("Hello"); | |
| } | |
| @Override | |
| public void sapa(String nama) { | |
| System.out.println("Hello " + nama); | |
| } | |
| } |
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
| /* | |
| * Copyright (c) 2011, StripBandunk and/or its affiliates. All rights reserved. | |
| * | |
| * http://stripbandunk.com/ | |
| * | |
| * STRIPBANDUNK PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. | |
| */ | |
| package khannedy.belajar.belajarjava.netbeans; | |
| /** | |
| * | |
| * @author Eko Kurniawan Khannedy | |
| */ | |
| public class SampleClass { | |
| private String nama; | |
| public String getNama() { | |
| return nama; | |
| } | |
| public void setNama(String nama) { | |
| this.nama = nama; | |
| } | |
| public void hello() { | |
| System.out.println("Hello"); | |
| } | |
| public void sapa(String nama) { | |
| System.out.println("Hello " + nama); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment