473,387 Members | 1,374 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

arrays in java..help!

11
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!
Mar 29 '07 #1
3 1141
r035198x
13,262 8TB
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.
Mar 29 '07 #2
zaacze
11
i've already replaced that part with the correct one...
Mar 29 '07 #3
r035198x
13,262 8TB
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.
Mar 29 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: matt melton | last post by:
Hi there, I am trying to write a method that accepts an array of any primitive type and will return the same array without copying memory as an array of bytes. ie. I'd like to be able to do...
5
by: johnny | last post by:
hello. in C++, you can fake a sub-array by passing something like (array + int). If this was passed to something that takes an array as a parameter, the function will deal with the array using...
6
by: Luke | last post by:
Here is my emails to Danny Goodman (but probably he is very busy so he didn't answered it). First email(simple): Subject: JavaScript Arrays " We all know the array can act like HashMap, but is...
15
by: Paul Morrison | last post by:
Hi all, I need to come up with some differences between arrays in Java and C, I have searched Google and so far all I have found is the following: Arrays in Java are reference types with...
3
by: John Bend | last post by:
Hello. Can anyone please suggest some good tutorial links where Java Vectors and Arrays are explained and compared? I'm a proficient programmer but fairly new to Java. Whilst I understand...
1
by: Rob Griffiths | last post by:
Can anyone explain to me the difference between an element type and a component type? In the java literature, arrays are said to have component types, whereas collections from the Collections...
1
by: Eric Capps | last post by:
This may be more of a Java question, but I feel that JavaScript experts may be more qualified to help me find a solution. In short: is it possible to call a Java method from JavaScript, passing...
41
by: Rene Nyffenegger | last post by:
Hello everyone. I am not fluent in JavaScript, so I might overlook the obvious. But in all other programming languages that I know and that have associative arrays, or hashes, the elements in...
1
by: javatech007 | last post by:
I am trying to save data into an array from JTextFields but dont know how to go about it. I have a number of textfields to enter information into it. I dont know where to start with how to use arrays...
110
by: fjm | last post by:
For some reason, I have always had a hard time understanding arrays as they pertain to php and databases. I understand associative arrays just fine but when there are multidimensional arrays, I kinda...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.