Question Info

This question is public and is used in 10 tests or worksheets.

Type: Multiple-Choice
Category: Java and JSP
Level: Continuing Education
Score: 1
Author: BacMan orange star
Last Modified: 4 days ago

View all questions by BacMan.

View Question

View this question.

Add this question to a group or test by clicking the appropriate button below.

Continuing Education :: Java and JSP by BacMan
What number is printed by this program?

public class Order {

    static { System.out.print("3"); }

    public Order() {
        System.out.print("2");
    }

    static { System.out.print("4"); }

    public static void main(String args[]) {
        System.out.print("5");
        Order order = new Order();
        System.out.print("1");
    }
}
  1. 32451
  2. 53241
  3. 52341
  4. 34521
  5. impossible to determine
  6. none of the above
You need to have at least 5 reputation to vote a question down. Learn How To Earn Badges.