If you want to store into the String name the value "George Bush", you would do which statement?


If you want to store into the String name the value "George Bush", you would do which statement?


a) String name = "George Bush";

b) String name = new String("George Bush");

c) String name = "George" + " " + "Bush";

d) String name = new String("George" + " " + "Bush");

e) Any of the above would work

Answer: e. Explanation: There are two ways to store a character string into a String variable, by constructing a new String using "new String(string value); " or by using an assignment statement, so either a or b will work. In c and d, we have variations where the String concatenation operator + is used. So all four approaches will work.