id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

jebbert@volusia.k12.fl.us > test2023_11_16_APP1SLHL_funnyWay
prev  |  next  |  chance

Write a method that accepts an array of integers called 'nums' and returns a string that represents that array in a particular format. The format is that each element of the array will be between an open and close parenthesis as shown in the test data. Look at the test data for examples. If 'nums' is empty, just return an empty string.


test2023_11_16_APP1SLHL_funnyWay([5, 6, 7, 8, 9]) → "(5)(6)(7)(8)(9)"
test2023_11_16_APP1SLHL_funnyWay([-5, 0, 7, -3]) → "(-5)(0)(7)(-3)"
test2023_11_16_APP1SLHL_funnyWay([200, -10, 50]) → "(200)(-10)(50)"

...Save, Compile, Run (ctrl-enter)

public String test2023_11_16_APP1SLHL_funnyWay(int[] nums) { }

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Java Help

Misc Code Practice

Difficulty: 245

Copyright Nick Parlante 2017 - privacy