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

 

zbaharav@kehillah.org 02-logic_and_string_intro > startOz
prev  |  next  |  chance

Given a string, return a string made of the first 2 chars (if present), however include first char only if it is 'o' and include the second only if it is 'z', so "ozymandias" yields "oz".


startOz("ozymandias") → "oz"
startOz("bzoo") → "z"
startOz("oxx") → "o"

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

public String startOz(String str) { }

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: 166.0

Copyright Nick Parlante 2017 - privacy