significance of this error message

L

learningjava

Hello,

I'm trying to use reflection to create a new instance of a class.
While reading somewhere, I remember that <init> in the error has a siginificance
but I don't recall it.
java.lang.NoSuchMethodException: Control$Class1.<init>(long)

Can someone who has come across it give me an idea what could be wrong?

Thanks

gk
 
M

Michael Borgwardt

learningjava said:
I'm trying to use reflection to create a new instance of a class.
While reading somewhere, I remember that <init> in the error has a siginificance
but I don't recall it.
java.lang.NoSuchMethodException: Control$Class1.<init>(long)

Can someone who has come across it give me an idea what could be wrong?

<init> means a constructor.
You're trying to call a constructor which takes a long as its parameter,
but the class in question has no such constructor.
 
C

Chris Smith

learningjava said:
I'm trying to use reflection to create a new instance of a class.
While reading somewhere, I remember that <init> in the error has a siginificance
but I don't recall it.
java.lang.NoSuchMethodException: Control$Class1.<init>(long)

That's a constructor. The named nested class called "Class1" inside of
"Control" doesn't have a constructor that takes a single long as a
parameter, but you're trying to call it.

--
www.designacourse.com
The Easiest Way to Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Building my own friend 4
origin of error message 0
Seeking co-founders for my company. 3
Error Handling 27
Tasks 1
Error codes vs. exceptions 135
Help With Error Message 0
Tkinter, Trouble with Message,Label widget 3

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top