dimanche 13 novembre 2016

What does the ":" operator mean without the "?" operator? Java

For example:

public static void main(String[] args) {

    int[] array = {1, 2, 3};

    for (int i : array) {
        System.out.print(i + " ");
    }

It prints "1 2 3" but why? What exactly is being counted?

Aucun commentaire:

Enregistrer un commentaire