0% found this document useful (0 votes)
11 views1 page

Java String Manipulation Lab Exercise

The document outlines a Java lab exercise focused on string manipulation. It includes tasks such as user input, string concatenation, substring extraction, case manipulation, and calculating string length. Students are required to submit their .java file on Blackboard upon completion of the exercise.

Uploaded by

gurjitca88
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views1 page

Java String Manipulation Lab Exercise

The document outlines a Java lab exercise focused on string manipulation. It includes tasks such as user input, string concatenation, substring extraction, case manipulation, and calculating string length. Students are required to submit their .java file on Blackboard upon completion of the exercise.

Uploaded by

gurjitca88
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Java Lab Exercise: String Manipulation

Objective:
Design a program that performs various operations on strings, including input,
concatenation, substring extraction, and case manipulation.

Tasks:
​ User Input:
● Prompt the user to enter a string.
● Store the input string in a variable.
​ String Concatenation:
● Concatenate the input string with another string of your choice.
● Display the result.
​ Substring Extraction:
● Prompt the user to enter the starting index and ending index for substring
extraction.
● Extract and display the substring based on the user's input.
​ Case Manipulation:
● Convert the original string to lowercase.
● Convert the original string to uppercase.
● Display both the lowercase and uppercase versions.
​ String Length:
● Calculate and display the length of the original string.

Submission:

Submit your .java file on Blackboard under lab2.

You might also like