how do I enter an integer argument for a java program (without using the command line) ?
argumentjava program with one argument
Page 1 of 1
3 Replies - 624 Views - Last Post: 22 November 2008 - 12:25 PM
Replies To: argument
#2
Re: argument
Posted 22 November 2008 - 03:07 AM
Are you looking to enter an argument in the main method or just an argument for a method you created in a class?
#4
Re: argument
Posted 22 November 2008 - 12:25 PM
valy0017, on 22 Nov, 2008 - 01:52 AM, said:
how do I enter an integer argument for a java program (without using the command line) ?
public static void main(String[] arg)
the array of String arg is there to receive command line arguments
theire are no other ways to pass a parameter to a java main method
you can put the argument in a file and read that file
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote




|