Question: (a) Look at the code below and answer the questions that follow: 1 int a = 10; 2 double b = 3.14; String concatString =

 (a) Look at the code below and answer the questions that

(a) Look at the code below and answer the questions that follow: 1 int a = 10; 2 double b = 3.14; String concatString = "A is "+a+" and B is "+b; String formatString = String.format("A is %d and B is %.2f", a,b); i. Provide the name of the String variable in the above code segment that demonstrates [02] which approach to creating Strings is more useful. ii. Provide a reason for your answer. [02] (b) Discuss the concept of quantifiers with regards to regular expressions. [01] (c) Provide a single regular expression that matches all television channels in the following [05] format. SCT 711.25MHz 51 SABC1 191.25MHz 6 CSN 647.25MHz 43 SABC3 247.13MHz 13 MNET 615.25MHz 39 SABC2 215.25MHz 9 E.TV 679.25MHz 47

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!