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

 

siochi@cnu.edu > greetingBasedUpon
prev  |  next  |  chance

Write a method that returns a String containing a greeting based upon the name and status of a person. If the person's name is John and his status is "knight" then the greeting should be Sir John. Otherwise the greeting should just be the person's name.


greetingBasedUpon("john", "knight") → "Sir john"
greetingBasedUpon("john", "fool") → "john"

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

public String greetingBasedUpon(String name, String status) { }

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

Copyright Nick Parlante 2017 - privacy