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,

  1. 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

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!