Write a java program to create a new string taking first 3 characters from a given string. If the length of string is less than 3 use as substitute characters. Take the string from user
Write a java program to create a new string taking first 3 characters from a given string. If the length of string is less than 3 use as substitute characters. Take the string from user
Chapter7: Characters, Strings, And The Stringbuilder
Section: Chapter Questions
Problem 12RQ
Related questions
Question
![Write a java program to create a new string taking first
3 characters from a given string. If the length of string
is less than 3 use
as substitute characters.
Take the string from user](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2F51974b7f-0a13-40fa-97ce-83b475a11e2d%2Fbe9201e8-f43b-4472-a541-d2d93ef4478f%2Fc3oempc_processed.jpeg&w=3840&q=75)
Transcribed Image Text:Write a java program to create a new string taking first
3 characters from a given string. If the length of string
is less than 3 use
as substitute characters.
Take the string from user
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Recommended textbooks for you
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
![EBK JAVA PROGRAMMING](https://www.bartleby.com/isbn_cover_images/9781337671385/9781337671385_smallCoverImage.jpg)
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT