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

 

getValue


Create a method getValue that will take in a String formatted like this: "Label: Value" Return everything after the colon and space. You may assume: There will always be exactly one colon. There will always be a space after the colon.


getValue("Name: Jeff") → "Jeff"
getValue("Favorite Color: Blue") → "Blue"
getValue("Grade Level: 11") → "11"

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

public String getValue(String text) }

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

Post-solution available

Copyright Nick Parlante 2017 - privacy