argument

java program with one argument

Page 1 of 1

3 Replies - 751 Views - Last Post: 22 November 2008 - 12:25 PM Rate Topic: -----

#1 valy0017  Icon User is offline

  • New D.I.C Head

Reputation: -5
  • View blog
  • Posts: 42
  • Joined: 18-November 08

argument

Post icon  Posted 22 November 2008 - 02:52 AM

how do I enter an integer argument for a java program (without using the command line) ?
Is This A Good Question/Topic? 0
  • +

Replies To: argument

#2 Hurshai  Icon User is offline

  • D.I.C Head

Reputation: 6
  • View blog
  • Posts: 51
  • Joined: 14-September 08

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?
Was This Post Helpful? 1
  • +
  • -

#3 valy0017  Icon User is offline

  • New D.I.C Head

Reputation: -5
  • View blog
  • Posts: 42
  • Joined: 18-November 08

Re: argument

Posted 22 November 2008 - 05:36 AM

argument for main
Was This Post Helpful? 0
  • +
  • -

#4 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8342
  • View blog
  • Posts: 31,880
  • Joined: 06-March 08

Re: argument

Posted 22 November 2008 - 12:25 PM

View Postvaly0017, 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
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1