Current Forum: Homework 3 Forum |
Date: Sun Sep 30 2001 12:41 am |
Author: Fagan, Matthew T. <mfagan@andrew.cmu.edu> |
Subject: Re: Casting int to Object |
|
|
I've been trying to add an int into my linenum Vector. Every time I try to add an int in, it gives me an error:
public void Insert(String word, int location) {... linenum.add(location); ...} where linenum is a Vector, I get the following error: TrieNode.java: Incompatible type for method. Can't convert int to Java.lang.Object. linenum.add(location) ^
What's going on here?
|
|