Professional Documents
Culture Documents
Lab 3
Lab 3
Lab 3
Lab 3
19_02_2021
AYUSHI JAIN
19BCE1576
1. Given two strings (str1 and str2) of lower-case letters, perform the following
operations:
▪ Sum the lengths of str1 and str2.
▪ Determine if is lexicographically larger than (i.e.: does come before in the
dictionary?).
▪ Capitalize the first letter in str1 and str2 and print them on a single line,
separated by a space.
Input Format
hello
java
Output Format
9
No
Hello Java
2. You are updating the username policy on your company's internal networking
platform. According to the policy, an username is considered valid if all the
following constraints are satisfied:
The username can only contain alphanumeric characters and underscores (_).
Alphanumeric characters describe the character set consisting of English
lower-case [a-z] characters , upper-case [A-Z] characters , and digits [0-9].
Example
3. Write a Java program to convert the given number into word form?
4. Write a java program to reverse the given string without using auxiliary string