Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

program in java. Get a string from user and also validate it’s length should be at least 1. Pass this string to a method that returns a new string with the first char added at the front and end, so "cat" yields "ccatc".

Q#1 Get a string from user and also validate it’s length should be at least 1. Pass this string to a method that
returns a new string with the first char added at the front and end, so "cat" yields "ccatc".
  
  
 
PREVIOUS NEXT
Tagged: #program #Get #string #user #validate #length #Pass #string #method #returns #string #char #added #front #yields
ADD COMMENT
Topic
Name
4+3 =