filmov
tv
Java Practice-it Introduction to Java Programming | Self-Check 1.24 Strange2

Показать описание
Topics:
classes, method basics, mystery, println
Question:
What is the output produced from the following program? You may wish to draw a structure diagram first. This is a slightly modified version of the previous problem, Strange.
public class Strange {
public static void main(String[] args) {
first();
third();
second();
third();
}
public static void first() {
}
public static void second() {
first();
}
public static void third() {
first();
second();
}
}
Problem:
classes, method basics, mystery, println
Question:
What is the output produced from the following program? You may wish to draw a structure diagram first. This is a slightly modified version of the previous problem, Strange.
public class Strange {
public static void main(String[] args) {
first();
third();
second();
third();
}
public static void first() {
}
public static void second() {
first();
}
public static void third() {
first();
second();
}
}
Problem: