Document ID: ./input/supremecourt_opinions/opinions/20pdf/18-956_d18f.pdf
Page Number: 11.0

Cite as:  593 U. S. ____ (2021) 

7 

Opinion of the Court 

recipe  in  hand,  the  robot  then  moves  to  your  kitchen  and 
gives it to a cook to prepare the dish.  This example mirrors 
the  API’s  task-related  organizational  system.    Through
your simple command, the robot locates the right recipe and 
hands  it  off  to  the  cook.  In  the  same  way,  typing  in  a 
method  call  prompts  the  API  to  locate  the  correct  imple-
menting  code  and  hand  it  off  to  your  computer.    And  im-
portantly,  to  select  the  dish  that  you  want  for  your  meal, 
you do not need to know the recipe’s contents, just as a pro-
grammer  using  an  API  does  not  need  to  learn  the  imple-
menting code.  In both situations, learning the simple com-
mand is enough.

Now let us consider the example that the District Court
used  to  explain  the  precise  technology  here.  Id.,  at  980– 
981.  A programmer wishes, as part of her program, to de-
termine which of two integers is the larger.  To do so in the 
Java language, she will first write java.lang.  Those words 
(which we have put in bold type) refer to the “package” (or 
by analogy to the file cabinet).  She will then write Math. 
That word refers to the “class” (or by analogy to the drawer). 
She will then write max.  That word refers to the “method” 
(or by analogy to the recipe).  She will then make two pa-
rentheses ( 
).  And, in between the parentheses she will
put two integers, say 4 and 6, that she wishes to compare.
The whole expression—the method call—will look like this: 
“java.lang.Math.max(4,  6).”  The  use  of  this  expression
will, by means of the API, call up a task-implementing pro-
gram that will determine the higher number. 

In  writing  this  program,  the  programmer  will  use  the 
very symbols we have placed in bold in the precise order we 
have placed them.  But the symbols by themselves do noth-
ing.  She must also use software that connects the symbols 
to the equivalent of file cabinets, drawers, and files.  The 
API  is  that  software.  It  includes  both  the  declaring  code
that  links  each  part  of  the  method  call  to  the  particular
task-implementing  program,  and  the  implementing  code