jwhiteknight's Profile User Rating: -----

Reputation: 0 Apprentice
New Members
Active Posts:
14 (0.02 per day)
09-January 13
Profile Views:
Last Active:
User is offline Feb 08 2013 01:13 PM

Previous Fields

Dream Kudos:
Icon   jwhiteknight has not set their status

Posts I've Made

  1. In Topic: java fractions

    Posted 5 Feb 2013

    i have tried changing the code to this... and i ended up with this error

    error 39 ".class" expect
    rational rational1 = new Rational(double num1,double den1);

    I am guessing that this didn't even fix the original error message

     System.out.print("Please enter the denominator for the frist fraction\n");
                den1 = input.nextDouble();
                Rational rational1 = new Rational(double num1,double den1);
  2. In Topic: 8 queens 1 dimensional array

    Posted 21 Jan 2013

    fix the code, so i don't get any errors, when I go and compile the code, but when I go to run the program I don't get any out put I think I am stuck in some sore of loop and it is not getting to the printboard method.
    public class EightQueens
        public static  void main (String args []) // main method
            int size = 8;
            int [] board = new int [size];
        int  y =0;
        board[0] = 1;
        while (y >=0)
    while ((board[y]< 8) && (solveQueens( y, board)))// int [])));
        if (board[y] < 8)
        if( y < 7)
            displayBoard( board);
       // else
       // {
         //   y--;
       // }
        }//  end main
        private static boolean solveQueens(int y,int[] board)
    int x = board[y];
    //system.out.printf (" in method solvequeens %d",x);
    for (int i = 1;i < x; i++)
    int t = board[y-1];
    if (t==x || t==x - i || t ==x +1)
        return true;
  3. In Topic: 8 queens 1 dimensional array

    Posted 20 Jan 2013

    View Postianian112, on 20 January 2013 - 06:23 PM, said:

    sorry if you find this rude, but have you ever programmed in Java before?

    Your method expects an array, but you call it without one on line 24.

    no i don't find it very rude.. I am very new to java I am just starting my second java class. I would rather be learning MCSA... but I am trying my best
  4. In Topic: fibonacci loop repeadly ask the user a question unless user enter "

    Posted 10 Jan 2013

    i was wrong the error is setting up the indexing for the array.
    " int max = number; " get me an error message
    but if i do
    " into max = 71" a limit in the length of the array the program work
    just fine

    thank you for your help
  5. In Topic: fibonacci loop repeadly ask the user a question unless user enter "

    Posted 10 Jan 2013

    thank you that help. the program is running now, but I am getting an other error in line 13 and 34. " arrayindexoutofboundseception"

    i don't think i have the output formatted correctly.

My Information

Member Title:
New D.I.C Head
Age Unknown
Birthday Unknown

Contact Information



jwhiteknight hasn't added any friends yet.


jwhiteknight has no profile comments yet. Why not say hello?