Results 1 to 6 of 6

Thread: Print command?

  1. #1
    elliojonhy is offline Member
    Join Date
    Dec 2010
    Posts
    4
    Rep Power
    0

    Default Print command?

    hey. Basically for my coursework i need to be able to have a command that when i run the jcreator program it will print the results of the calculations within the program. Hope that makes sense.

    Thanks in advance

  2. #2
    maknib is offline Member
    Join Date
    Nov 2010
    Posts
    90
    Rep Power
    0

    Default

    you mean like

    system.print(results_variable);
    ??

  3. #3
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,565
    Rep Power
    12

    Default

    ...

    (post no longer makes sense :)
    Last edited by pbrockway2; 12-02-2010 at 02:04 AM.

  4. #4
    elliojonhy is offline Member
    Join Date
    Dec 2010
    Posts
    4
    Rep Power
    0

    Default

    Thanks for the reply but im still a little lost For example:

    import java.io.*;
    class add
    {
    public static void main ( String[] args )
    {
    int num1 = 40;
    int num2 = 10;
    int sum;

    System.out.println("First Number: " + num1 );
    System.out.println("Second Number: " + num2);
    System.out.println("Sum: " + (num1+num2) );

    }
    }


    Say i wanted to print the last time only (the sum) What would or how would i send the command so that i can print the results to paper?

  5. #5
    maknib is offline Member
    Join Date
    Nov 2010
    Posts
    90
    Rep Power
    0

    Default

    Ohhhh you mean an actual Printer HAHA now i get you.
    i h ave no idea, one of the gurus here would probably know what to research


    --EDIT--

    did a quick search, this should help

    http://tinyurl.com/23lmoml

  6. #6
    Zack's Avatar
    Zack is offline Senior Member
    Join Date
    Jun 2010
    Location
    Destiny Islands
    Posts
    692
    Rep Power
    4

Similar Threads

  1. How can i print?
    By Holmez in forum New To Java
    Replies: 0
    Last Post: 11-02-2009, 11:06 AM
  2. cant get to print...
    By chango77745 in forum New To Java
    Replies: 0
    Last Post: 02-13-2009, 06:04 AM
  3. Print the text file and print preview them
    By Java Tip in forum java.awt
    Replies: 0
    Last Post: 06-22-2008, 11:04 PM
  4. Unable to execute command line command in java
    By LordSM in forum New To Java
    Replies: 1
    Last Post: 08-08-2007, 12:23 AM
  5. Print XML tag
    By DonCash in forum XML
    Replies: 2
    Last Post: 08-07-2007, 06:02 PM

Posting Permissions

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