Question: Do we have always use string pattern = new String (data) in java or I can use string pattern= value? in general, do we use
Do we have always use string pattern =new String(data) in java or I can use string pattern= value? in general, do we use always string str= new string or string str=value;
for example,
- In the body of the main method, declare a single String class type variable named pattern.
The pattern will hold the address of a String object with a string literal as its value, which is needed to be created in problem 4.
*
* *
* * *
* * * *
* * * * *
* * * *
* * *
* *
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
