Lab 1 ( StringBuilder StringBuffer)
- Write a program using both StringBuilder and StringBuffer classes.
- Utilize the following methods from both classes: Replace, Reverse, Substring, Append, Insert, toString, trim, and delete.
- Initialize a string in both classes using constructors.
- Print the string using toString() method.
- Refer to the examples provided on GitHub (StringBuilder Eg and StringBuilderVsStringBufferSpeed).
- Sample output:
Due Date : Due Date :06/07/2023 12:00 PM
How to submit lab?
-
Add your full name and email at the top of the file using a comment tag.
-
Compile and run your program, entering the required inputs.
-
Take a screenshot of the result.
-
Zip your project with the source code, then upload it on Blackboard.
-
Upload screenshot on Blackboard.
-
Note: Submit the assignment on Blackboard by the due date. Email and late submissions will not be accepted.