arrays in java..help!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • zaacze
    New Member
    • Mar 2007
    • 11

    #1

    arrays in java..help!

    i have this program in which the class looks like this:

    class carcollection{
    carArr[] carstoo = new cararr[];

    class carcollect extends carcollection{
    String brand name;
    String model;
    int speed;
    int price;
    }
    }
    public static void main(String[] args){
    carcollection cc.new carcollection( );

    My problem is that i have no idea how to say display or add a new record in the said program. in displaying can i like do something like cc.brandname? am so confused! please help me!
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by zaacze
    i have this program in which the class looks like this:

    class carcollection{
    carArr[] carstoo = new cararr[];

    class carcollect extends carcollection{
    String brand name;
    String model;
    int speed;
    int price;
    }
    }
    public static void main(String[] args){
    carcollection cc.new carcollection( );

    My problem is that i have no idea how to say display or add a new record in the said program. in displaying can i like do something like cc.brandname? am so confused! please help me!
    carArr[] carstoo = new cararr[];

    will not compile

    Read this.

    Comment

    • zaacze
      New Member
      • Mar 2007
      • 11

      #3
      i've already replaced that part with the correct one...

      Comment

      • r035198x
        MVP
        • Sep 2006
        • 13225

        #4
        Originally posted by zaacze
        i've already replaced that part with the correct one...
        If you read that thread I gave you I'm sure you'll be able to complete the rest of your program without requiring further assistance.

        Comment

        Working...