Ruby - MethodsWhy do Ruby predicate methods conventionally end with a question mark?ATo improve performanceBTo make the method privateCTo allow method overloadingDTo indicate the method returns a boolean valueCheck Answer
Step-by-Step SolutionSolution:Step 1: Understand Ruby naming conventionsMethods ending with '?' signal they answer yes/no questions by returning true or false.Step 2: Eliminate incorrect optionsEnding with '?' does not affect privacy, overloading, or performance.Final Answer:To indicate the method returns a boolean value -> Option DQuick Check:Question mark means boolean return [OK]Quick Trick: Question mark signals boolean return in method names [OK]Common Mistakes:Thinking '?' changes method visibilityAssuming '?' enables overloadingBelieving '?' affects speed
Master "Methods" in Ruby9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More Ruby Quizzes Arrays - Array creation methods - Quiz 6medium Control Flow - If, elsif, else statements - Quiz 11easy Hashes - Accessing and setting values - Quiz 11easy Loops and Iteration - Loop method for infinite loops - Quiz 2easy Methods - Bang methods (ending with !) - Quiz 5medium Methods - Why methods always return a value in Ruby - Quiz 3easy Ruby Basics and Runtime - What is Ruby - Quiz 12easy Ruby Basics and Runtime - Comments and documentation - Quiz 2easy String Operations - String methods (upcase, downcase, strip) - Quiz 8hard Variables and Data Types - String interpolation with #{} - Quiz 9hard