Results 1 to 8 of 8
  1. #1
    ryn21 is offline Member
    Join Date
    Oct 2008
    Posts
    16
    Rep Power
    0

    Default compiler is having problems

    my compiler is broken please help

    input values:
    7 3 6 4
    2 6 3 5

    what is the output?

    Java Code:
    import java.util.*;
    import java.io.*;
    import javax.swing.JOptionPane;
    
    public class ex14
    
    {
    
    
    
    static Scanner console = new Scanner(System.in);
    
    
    
    public static void main ( String[] args )
    {
    int first, third;
    IntClass second, fourth;
    
    first = 3
    second= new IntClass(4);
    third=6;
    fourth = new IntClass(7);
    System.out.println(first + " " + second.getNum()
    + " " + third + "
    + fourth.getNum());
    getData(first, second, third, frouth);
    System.out.println(first + " " + second.getNum()
    + " " + third + "
    + fourth.getNum());
    fourth.setNum(first * second.getNum() + third +
    fourth.getNum());
    getData(third, fourth, first, second);
    System.out.println(first + " " + second.getNum()
    + " " + third + "
    + fourth.getNum());
    
    }
    public static void getData (int a, IntClass b, int c, IntClass d)
    {
    a = console.nextInt();
    b.setNum(console.nextInt());
    c = console.nextInt();
    d.setNum(console.nextInt());
    
    b.setNum(a * b.getNum() - c);
    d.setNum(b.getNum() + d.getNum());
    
    
    
    }
    
    
    
    }

  2. #2
    ryn21 is offline Member
    Join Date
    Oct 2008
    Posts
    16
    Rep Power
    0

    Default

    come one someone help me please

  3. #3
    gnarly hogie is offline Member
    Join Date
    Oct 2008
    Posts
    34
    Rep Power
    0

    Default

    Ill bite, how did your compiler break

  4. #4
    ryn21 is offline Member
    Join Date
    Oct 2008
    Posts
    16
    Rep Power
    0

    Default

    not sure im using my friends computer and it not working, i have to turn in this hw tomorrow. just need someone to cut and paste this real quick

  5. #5
    CJSLMAN's Avatar
    CJSLMAN is offline Moderator
    Join Date
    Oct 2008
    Location
    Mexico
    Posts
    1,159
    Rep Power
    7

    Default Sorry...

    Sorry.. not happening. The forum doesn't do homework. It helps people who want to improve their programming skills. Doing your homework for you will not help you.
    CJSL
    Last edited by CJSLMAN; 10-10-2008 at 07:37 AM.

  6. #6
    ryn21 is offline Member
    Join Date
    Oct 2008
    Posts
    16
    Rep Power
    0

    Default

    wow i'm obviously doing hw after reading the chapter which will make me better. I just need help on this one question.

  7. #7
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by ryn21 View Post
    wow i'm obviously doing hw after reading the chapter which will make me better. I just need help on this one question.
    You should explain clearly your question. You have a code and some input, asking what's the output. It's obvious, I think no one wants to run your code and find the results for you.

    I already found such a similar question, regarding compiler broken. What you mean that? Can't you compile any Java code. What happen when you try it?

  8. #8
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    So download a new version of the JDK and you're in business. Access to the web you seemingly have.

Similar Threads

  1. Compiler
    By pawankumarom in forum New To Java
    Replies: 3
    Last Post: 09-08-2008, 01:11 PM
  2. Compiler?
    By robin105 in forum New To Java
    Replies: 2
    Last Post: 07-26-2008, 02:46 AM
  3. compiler
    By jidd in forum New To Java
    Replies: 3
    Last Post: 01-29-2008, 12:40 PM
  4. Compiler Error
    By jeneal in forum New To Java
    Replies: 5
    Last Post: 12-13-2007, 01:31 PM
  5. Asking for the compiler
    By fernando in forum Other IDEs
    Replies: 1
    Last Post: 08-06-2007, 09:04 AM

Posting Permissions

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