User Profile

Collapse

Profile Sidebar

Collapse
Stephen3776
Stephen3776
Last Activity: May 19 '07, 02:59 PM
Joined: Apr 29 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • If you are trying to sort try doing something like this:


    Code:
     public void nameSort()
       {
          for (int i = 1; i < stores.length; i++)
          {
             int j;
             Product val = stores[i];
             for (j = i - 1; j > -1; j--)
             {
                Product temp = stores[j];
                if (temp.compareTo(val) <= 0)
                {
    ...
    See more | Go to post

    Leave a comment:


  • Stephen3776
    replied to output Array help
    in Java
    Thanks for the help, glad it was so simple
    See more | Go to post

    Leave a comment:


  • Stephen3776
    replied to output Array help
    in Java
    The line I am getting the error on is:

    Code:
    outputArray(itemNumber);
    See more | Go to post

    Leave a comment:


  • Stephen3776
    replied to output Array help
    in Java
    output Array help part2

    This part is not the problem, but here is the rest of the code:

    Code:
    class Product extends Main implements Comparable
    {  //Declare class variables to store item information
       private String title;   
       private int item;     
       private double stockOnHand;   
       private double cost;     
       //Declare product constructor for use by subclasses and clear variables
    ...
    See more | Go to post

    Leave a comment:


  • Stephen3776
    started a topic output Array help
    in Java

    output Array help

    I am doing an inventory control progam and trying to output a multiple array, I am getting an illegal conversion error java.lang.doubl e !d. Can somebody tell me what I am doing wrong or if there is another way?

    Code:
    /*
     * Main.java
     *
     * Created on April 29, 2007, 6:57 PM
     *
     * To change this template, choose Tools | Template Manager
     * and open the template in the editor.
     */
    ...
    See more | Go to post
No activity results to display
Show More
Working...