I'm doing an assignment for class that requires me to create a class that extends ArrayList<Double>. However I cannot make an ArrayList<Double> without getting an error.
I created a new class to try and test it and it still doesn't work. Here's what I have:
import java.util.ArrayList;
public class imSad {
ArrayList<Double> var = new ArrayList<Double>();
var.add(double 15.0);
var.add(15.0);
However this gives me the error : Syntax Error on token "15.0" invalid VariableDeclaratorID and Syntax Error on token "add" Identifier expected after this token.
What am I doing wrong? I've tried searching it but I'm having trouble finding much on arraylists of doubles.
var.add(double 15.0);to compile?doublefrom before15.0. Everything else is perfect.