Question: 1 a ) To create the string Welcome to Java, you may use a statement like this: String s = Welcome to Java ; Or

1a)To create the string Welcome to Java, you may use a statement like this: String s =Welcome to Java;
Or
String s = new String (Welcome to Java);
Which one is better? Why?
1b) Does any method in the String class change the contents of the string?
1c)How do you convert a char, an array of characters, or a number to a string?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!