Thursday, 10 May 2018

Java: Methods Memanggil Methods

Contoh souce code pada java dimana methods akan memanggil kembali methods:
public class MethodsExample {
    public static void main(String[] args) {
        message1();
        message2();
        System.out.println("Done with main.");
    }

    public static void message1() {
        System.out.println("This is message1.");
    }

    public static void message2() {
        System.out.println("This is message2.");
        message1();
        System.out.println("Done with message2.");
    }
}

Hasil dari source code di atas adalah sebagai berikut:

No comments:

Post a Comment

Odoo 11 - Create a new sample module

How To Create or Develop a Custom Module in Odoo 11 In this blog, we‘ll be focusing on how we can create or develop a custom mo...