Home / Expert Answers / Computer Science / question-2-25-marks-strings-are-objects-that-are-widely-used-in-java-programming-the-java-platf-pa382

(Solved): QUESTION 2 (25 marks) Strings are objects that are widely used in Java programming. The Java platf ...



QUESTION 2 (25 marks)
Strings are objects that are widely used in Java programming. The Java platform provides the String cla

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. (5 marks)


We have an Answer from Expert

View Expert Answer

Expert Answer


Answer of (a) - String are immutable data types in java which are used to store sequence of character. They are generally used to store text in them.E
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe