Menu

(Solved) : Given String Return First Character String Contains 4 Characters Last Character Otherwise Q31574942 . . .

Java Programming

Given a string return the first character in the string if it contains more than 4 characters, and the last character otherwise. firstOrLastChar(kwk)- k firstOrLastChar(gals) → s firstOrLastCharCuocrws)-u For example: Test Result System.out.println(firstorLastchar(qug))g

Given a string return the first character in the string if it contains more than 4 characters, and the last character otherwise. firstOrLastChar(“kwk”)- k firstOrLastChar(“gals”) → ‘s’ firstOrLastCharCuocrws”)-‘u’ For example: Test Result System.out.println(firstorLastchar(“qug”))g Show transcribed image text

Expert Answer


Answer to Given String Return First Character String Contains 4 Characters Last Character Otherwise Q31574942 . . .

OR