Hi Every One I Have Small Doubt Please answer
This????????????????????????????

I Want to use AbstractList class
methods(java.util.AbstractList)

My Program is

import java.util.*;
class DemoOne extends AbstractList
{
public static void main(String[] args)
{
AbstractList a=new DemoOne();//This One is Correct??
DemoOne a1=new DemoOne();//This One is Correct?? Both Are
Not Working
System.out.println("Hello World!"+a);
System.out.println("Hello World!"+a1);
}
}

Error IS:
DemoOne.java:2: DemoOne is not abstract and does not
override abstract method get(int) in java.util.AbstractList
class DemoOne extends AbstractList


AnyOne can Please Provide The
Solution????????????????????????? Plzzzzzzz

Answer Posted / raghav

Bcoz ur class ( DemoOne ) is concrete class so u r forced to provide body to that methods that r unimplemented in java.util.AbstractList

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how we can make a read-only class in java?

537


Does string isempty check for null?

556


What data type is true or false?

567


Is array synchronized in java?

548


Why vector is used in java?

552






What is the purpose of main function in java?

531


Which are different kinds of source code?

650


Describe the term diamond problem.

572


What is definition and declaration?

517


What are the differences between checked exception and unchecked exception?

520


Is assembly language a low level language?

491


How can we find the sum of two linked lists using stack in java?

560


Can we store variables in local blocks?

780


What do you understand by the term wrapper classes?

536


How does a for loop work?

497