Question: QUESTION 2 (25 marks) Strings are objects that are widely used in Java programming. The Java platform provides the String class to create and manipulate

QUESTION 2 (25 marks) Strings are objects that are widely used in Java programming. The Java platform provides the String class to create and manipulate strings. (a) Define the term string. Provide THREE (3) examples of string. (5 marks) * Your answer (b) Explain the purpose of using the equals( ) function. (2 marks) * Your answer (c) Explain the function of booleanequal function. (2 marks) * Your answer (d) Describe the term string concatenation. List down the operator or symbol used to concatenate string. ( 3 marks) Your answer (e) Define TWO (2) ways of constructing strings. Provide TWO (2) example for each way mentioned. (8 marks) Your answer (f) Explain compareTo ( ) method. Provide ONE (1) example on the usage of * compareTo () method
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
