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

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,052
Latest member
KetoBeez

Latest Threads

Top