Overload the doubleconcat method from exercise such that if


Question: Overload the doubleConcat method from Exercise such that if the integer parameter is not provided, the method returns the string itself without concatenation. For example, if the string is "hello", the return string is also "hello".

Exercise: Write a method called doubleConcat that takes a String and an integer as parameters. Return a String that consists of the string parameter concatenated with itself twice the number times, where number is an integer parameter. For example, if the parameter values are "hello" and 1, the return value should be "hellohello". Return the original string if the integer parameter is less than 1.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Overload the doubleconcat method from exercise such that if
Reference No:- TGS02318649

Expected delivery within 24 Hours