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

 

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

Write a method that returns the name of the book about hobbits as indicated in the test data. Any integer from 0 to 4 should return the indicated book title. Any other integer will cause the method to return "N/A". Make sure you start by looking at the test data by running a dummy method that just returns any string.


hobbit2(0) → "The Hobbit"
hobbit2(1) → "The Lord of the Rings"
hobbit2(2) → "The Two Towers"

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

public String hobbit2(int num) { }

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

Copyright Nick Parlante 2017 - privacy