answersLogoWhite

0

In Java, the main() method is typically written something like this:public static void main(String [ ] args)

The argument is what is in parentheses, in this case: "String [] args". I believe this can also be written as "String args[]". It refers to parameters received by the Java program from the command line. That is, the user can write, for example:

java MyClass info1 info2

In this example, "info1" and "info2" will be received by the main method, in the args[] array.

User Avatar

Wiki User

9y ago

What else can I help you with?

Continue Learning about Engineering

What is the use of passing an argument by value?

Passing an argument by value means that the method that receives the argument can not change the value of the argument. Passing an argument by reference means that the method that receives the argument can change the value of the incoming argument, and the argument may be changed in the orignal calling method.


What is the name given to the technique whereby a function argument can be modified by passing a pointer to the argument?

Call_by_reference


What argument passes in a method that will reference the content and can change the variable in the method?

That is called passing an argument by reference.


What is the difference between parameters and arguments in VB?

In programming languages, a parameter and an argument are the same thing; there is no actual difference between the two. Although a few languages do differentiate between an actual argument and a formal argument by calling one a parameter and the other an argument (or vice versa), the terms are universally interchangeable. That is; there is no single definition that applies to any one language, including Visual Basic. The language may have a convention, but there's no reason to follow that convention. Personally, I prefer the term argument and use the terms formal argument and actual argument whenever I need to specifically differentiate one from the other. In this way I can refer to them in a consistent but language-agnostic manner. Only a Pedant would argue that the terms parameter and argument have a specific meaning to a specific language, even when the creators of that language use the terms interchangeably themselves. To clarify, an actual argument is the argument being passed to a function while a formal argument is the argument that is used by the function. The two will always have the same value, but they are not the same argument. For instance, consider the following function definition: f (int a) { print a*2 } Whether we regard 'a' as being a parameter or an argument is immaterial -- it is a formal argument or formal parameter, whichever you prefer. The meaning is clarified by using the word "formal". Now consider the calling code: b = 42 f (b) Here, b is the actual argument (or actual parameter) being passed to the function f. Note that a and b are not the same variable or reference. That alone means there is no reason to differentiate them; the meaning of argument or parameter is implied by the context alone. It doesn't matter whether the function uses pass by value or pass by reference semantics. When passing arguments by value, a is simply a copy of b (independent variables with the same value). When passing by reference, a refers to the same memory address as b (a is an alias for b). In either case, the function uses the formal argument named a while the calling code uses the actual argument named b. In other words, the names are only accessible from within the scope in which they are declared, even if they refer to the same memory address. Of course, a function may pass one of its formal arguments to another function. Thus with respect to the calling function, its formal argument becomes an actual argument to the function being called.


What gives an argument warrant?

Supporting evidence

Related Questions

What does counter argument mean?

A counter argument is an argument made against another argument.


What is the use of passing an argument by value?

Passing an argument by value means that the method that receives the argument can not change the value of the argument. Passing an argument by reference means that the method that receives the argument can change the value of the incoming argument, and the argument may be changed in the orignal calling method.


What are the 4 fundamentals of logic?

Argument Deductive argument Inductive Argument Analogy


What is the correct spelling for argument?

argument


What makes an argument an argument?

An argument is inductive when it is based on probability, such as statistics. In an inductive argument, if the premises are true, the conclusion is probably true.


Can an Argument be Noid?

No, an argument cannot be void. An argument can be weak, flawed, or unconvincing, but it still retains its basic structure and content. A void argument would imply that there is no argument at all.


Which element is needed for a sound argument?

Evidence to support the argument is needed for a sound argument.


What is an argument from design?

An argument from design is a theological term for a teleological argument - an argument for the existence of God, such that because nature is orderly, it is evidence of a designer.


What is the thesis of a research essay?

The claim is the argument you plan to prove.


What is it called to have an argument?

To have an argument called Debate


What is a dominant and controlling argument called?

A central argument is a dominant and controlling argument.


WHich of either argument or argument is the right spelling?

The correct spelling of the word is argument.Some example sentences with this word are:There is an argument next door.The political argument wore on for hours.His argument brought up some valid points.