Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Abstract Classes

  Asked By: Bonni    Date: Apr 10    Category: Java    Views: 626
  

can anyone tell me how to access abstract classes from other classes?
or if can tell me how to fix this code:

for (int b = 0; b != Something.HOW.length; b++) {
for (int a = 0; a != Something.WHAT.length; a++) {
bla.add(new Something(Something.WHAT[a], Something.HOW[b]));

where:

bla = is and Arraylist already declaired and assigned to Arrylist();
Something = is an abstract class that implements compareable.
WHAT = is a String Array dealared as final with 10 string elements.
HOW = is also String Array dealared as final with 5 string elements.

a & b = are instances of WHAT and HOW respectively


and the Error im getting is:

1 error found:
File: C:\BlaBla - Bloo\Bla.java [line: 10]
Error: Something is abstract; cannot be instantiated


if u can hit me back with anything u might know about how to fix this
i would truely appreciate it!!!

Share: 

 

No Answers Found. Be the First, To Post Answer.

 
Didn't find what you were looking for? Find more on Abstract Classes Or get search suggestion and latest updates.




Tagged: