Question Info

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

Type: Multiple-Choice
Category: Java and JSP
Level: Continuing Education
Score: 1
Author: BacMan
Last Modified: 10 years ago

View all questions by BacMan.

Java and JSP Question

View this question.

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

Continuing Education Java and JSP

What is the output of the following program?

public class ChangeMe {

    private static void changeMe(String s) {
        s = new String("Blue");
    }

    public static void main(String args[]) {
        String color = new String("Red");
        changeMe(color);
        System.out.println(color);
    }
}
  1. Red
  2. Blue