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

 

abraskin@mbusd.org 2016_student_creations_01 > stringnumboo
prev  |  next  |  chance

Given a String, integer, and boolean value: if b is true, return the even indexed characters up to the nth indexed character including 0. If b is false, return the odd indexed characters up to the nth indexed character not including 0. But if the length of s is shorter than n, return "melon".


stringnumboo("dog", 6, true) → "melon"
stringnumboo("killerkeemstar", 8, false) → "ilre"
stringnumboo("melon", 3, true) → "ml"

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

public String stringnumboo(String s, int n, boolean b) { }

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: 100 Post-solution available

Copyright Nick Parlante 2017 - privacy