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

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter7: Characters, Strings, And The Stringbuilder
Section: Chapter Questions
Problem 12RQ
icon
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
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
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT