Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Beginning Java
Search Coderanch
Advance search
Google search
Register / Login
Forums
Register
Login
Java
»
Beginning Java
Error in Object Creation?
Phillipe Rodrigues
,
Ranch Hand
Jun 19, 2008 05:37:00
(0 cow)
(0 skulls)
+Pie
Number of slices to send:
Send
For below code why i get erro
output:
java.lang.NoSuchMethodError: main
Exception in
thread
"main"
package basics; public class A { public A(){ } } public class B extends A{ int i =10; B(){ new A(); } public static void main(String[] args) { new B(); } }
fred rosenberger
,
lowercase baba
staff
Jun 19, 2008 05:44:00
(0 cow)
(0 skulls)
+Pie
Number of slices to send:
Send
what are you typing on your command line? are you running "java A" or "java B"?
Post by:
autobot
The harder you work, the luckier you get. This tiny ad brings luck - just not good luck or bad luck.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
reply
This thread has been viewed 708 times.
Similar Threads
Constructors...
How to decide whether use IS A or HAS A Relation
object Vs instance
Object creation
Certification4Career SCJP Mock Exam Errors??
More...
All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 08:23:36
.