File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Applet argument? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Applet argument?" Watch "Applet argument?" New topic

Applet argument?

Jeremy Parsons
Ranch Hand

Joined: Apr 21, 2006
Posts: 74
In the following code, what is the "gr" in the Graphics argument? Could that "gr" be anything I want to call it, or is "gr" something reserved in java?

Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

"gr" is the (completely arbitrary) parameter name. Inside the method, it's the name of a variable that points to a Graphics object. You could substitute any legal Java variable name.

[Jess in Action][AskingGoodQuestions]
I agree. Here's the link:
subject: Applet argument?
It's not a secret anymore!