It's not a secret anymore!
The moose likes Beginning Java and the fly likes missing Integer class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "missing Integer class" Watch "missing Integer class" New topic

missing Integer class

Amrita Chaurasia

Joined: Jul 04, 2009
Posts: 7
while trying to create an instance of Integer Class..the compiler says there in no such constructor
Integer i = new Integer(1);

but there is no problem with other wrapper classes..
what should i do
Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

You don't have a class called Integer somewhere in your classpath, do you ? One that you made yourself.

[My Blog]
All roads lead to JavaRanch
Vijitha Kumara

Joined: Mar 24, 2008
Posts: 3899

Can you post your code?

[How to ask questions] [Twitter]
Amrita Chaurasia

Joined: Jul 04, 2009
Posts: 7
oh I got the mistake..
I had my own Integer Class that existed in classpath
so it dint take java.lang.Integer class
I agree. Here's the link:
subject: missing Integer class
It's not a secret anymore!