File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Object() in java.lang.Object cannot be applied to..

 
Accela Moon
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure how do I proceed from here to solve this error, please help if possible.. thanks.


Error:

[JAM --> Edited formatting to improve readability]
[ April 16, 2004: Message edited by: Joel McNary ]
 
Tobias Hess
Ranch Hand
Posts: 55
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

After new, change Object to the name of your class. And remember, you have created a 2d array, therefore the left-hand side of your assignment should look like this:
entryList[a][b]
HTH,
Tobias
[ April 16, 2004: Message edited by: Tobias Hess ]
[ edited to break long line -ds ]
[ April 18, 2004: Message edited by: Dirk Schreckmann ]
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Accela,
I'm not sure what you're trying to do, BUT let me tell what you can't do. You're trying to construct an Object given arguments to a constructor that doesn't exist. I think maybe you're trying to actually put those items in an array instead of an Object constructor (in which case you'll get an exception saying you have an index that is out of bounds).
Does that help? If not, let us know what you're actually trying to do with the line: entryList[i] = ... because that is where the problem is.
 
Joel McNary
Bartender
Posts: 1824
Eclipse IDE Java Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, you've got two errors here.
First, you can't create a new Object with those parameters, because the Object constructor takes no parameters. What class of object are you trying to create here?
Second, you are trying to put a single Object into your entryList[i] position. Buy you've defined entryList as a 2D array, so entryList[i] really should be an array of objects. entryList[i][j] would be for a single object.
 
Accela Moon
Greenhorn
Posts: 20
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I'm trying to add the contents of the object into a 2d array, how do I fix this?
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Or the long way
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic