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

 

isLegal


The isLegal method is designed to determine whether a set of three strings representing playing cards contains exactly one occurrence of each of the following cards: "Jack", "Queen", and "King". The parameters a, b, c are three strings representing playing cards. Each string may contain the rank of Cards. This method returns true if exactly one occurrence of each of "Jack", "Queen", and "King" is present among the input strings, and false otherwise.


isLegal("9", "Jack", "Queen") → false
isLegal("King", "Queen", "Jack") → true
isLegal("Queen", "Jack", "King") → true

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

public boolean isLegal(String a, String b, String c) { }

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

Copyright Nick Parlante 2017 - privacy