TTOL Crwating Methods that Return a Value

docx

School

San Jacinto Community College *

*We aren’t endorsed by this school

Course

1013

Subject

Computer Science

Date

Dec 6, 2023

Type

docx

Pages

1

Uploaded by MagistrateLarkPerson835

Report
Two Truths & a Lie Creating Methods that Return a Value 1. The return type for a method can be any type, which includes numeric, character, and string, as well as other more specific types that exist in the programming language you are using. Answer T F 2. A method’s return type must be the same type as one of the method’s parameters. Answer T F Rationale The return type of a method can be any type. The return type must match the type of value in the method’s return statement. A method’s return type is not required to match any of the method’s parameters. 3. You are not required to use a method’s returned value. Answer T F
Discover more documents: Sign up today!
Unlock a world of knowledge! Explore tailored content for a richer learning experience. Here's what you'll get:
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help