dcsimg
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: ECollege Question

Hybrid View

  1. #1
    Join Date
    Nov 2015
    Posts
    2

    Angry ECollege Question

    I have a problem with a Java question on my ECollege course: Here it is:

    In the programs you have encountered so far you will have seen the main method used something like this: public static void main(String[] args)

    The args part of the program can accept values (parameters) when the program is called (run). Write a Java program called ShowArgs using Using Notepad++ or another plain code editor. This java program should accept two command line arguments when you are running the program. It should then output these arguments.

    Note: You will need to research outside of the course contents to complete this part of the assignment. Include comments to show that you understand fully what the program is doing

    Compile and run this .java source code from a command line. Place the command line arguments as words after the program name when you are running it with spaces between them as in apples and oranges below.

    Example:
    javac ShowArgs.java
    java ShowArgs apples oranges
    apples oranges

    Upload the ShowArgs.java source code that you used at the command line and a screenshot of the program being compiled and run from the command line. Any of the popular image formats will be accepted for the screenshot. Please keep the file name of the screen shot short.

    How do I work it

  2. #2
    Join Date
    Jun 1999
    Location
    Eastern Florida
    Posts
    3,856

    Re: ECollege Question

    What have you tried? What java programming problems are you having?
    Norm

  3. #3
    Join Date
    Nov 2015
    Posts
    2

    Re: ECollege Question

    Quote Originally Posted by Norm View Post
    What have you tried? What java programming problems are you having?
    I'm using Java 7 through Netbeans, I'm unsure of how to proceed....

  4. #4
    Join Date
    Jun 1999
    Location
    Eastern Florida
    Posts
    3,856

    Re: ECollege Question

    Start by defining a class and adding a main method to it. Add a println() statement to the main method that prints a message.

    See the tutorial: http://docs.oracle.com/javase/tutori.../netbeans.html
    Norm

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Windows Mobile Development Center


Click Here to Expand Forum to Full Width




On-Demand Webinars (sponsored)