🔒 Closed String[] args

Status
Not open for further replies.

codyscott

Honorary Poster
Another tip para sa inyo mga javadroids!

Kung hindi nyo pa alam kung anong ibig sabihin ng "String[] args" sa:
"public static void main(String[] args)"

Well, useful pala yan... lol!

When you run a java program sa COMMAND LINE, parameters are optional.
For example: >java MyJavaProgram param1 param2 param3
("param1 param2 param3 are optional parameters depende sa code nyo)

This tip teaches you how to do this with ECLIPSE's "COMMAND LINE" (instead of windows commandline)

Here are the steps (snapshots attached):
1) on ECLIPSE, you click RUN (on the menu)
2) click RUN CONFIGURATIONS
3) on left, hit JAVA APPLICATION
4) hit ARGUMENTS tab
5) inside PROGAM ARGUMENTS you type the parameters separated by spaces
6) then click run

That's it.
Instead of running your test sa windows commandline, you can do it here too.
 

Attachments

  • step1.webp
    step1.webp
    58.4 KB · Views: 21
  • step2.webp
    step2.webp
    60.7 KB · Views: 18
  • step3.webp
    step3.webp
    82.2 KB · Views: 18
  • step4.webp
    step4.webp
    70 KB · Views: 16
  • step5.webp
    step5.webp
    83.8 KB · Views: 16
Status
Not open for further replies.

About this Thread

  • 0
    Replies
  • 776
    Views
  • 1
    Participants
Last reply from:
codyscott

Trending Topics

Online now

Members online
917
Guests online
3,556
Total visitors
4,473

Forum statistics

Threads
2,306,443
Posts
29,171,755
Members
1,194,826
Latest member
rqhafjetj
Back
Top