Forums Register Login

Head first java excercise problem: Could not find main class

+Pie Number of slices to send: Send
Hi I am new to the forum and new to Java. This is in all likelihood a very dumb question. Please bear with me.

I am going through Head first Java. Following is the code of an excercise problem. I have A.java and Mixed2.java





For javac A.java there is no error
But for java Mixed2, I get the following error "Could not find the main class:Mixed 2"
Please help
+Pie Number of slices to send: Send
 

But for java Mixed2, I get the following error "Could not find the main class:Mixed 2"


Did you compile the Mixed2 class ? (javac, not java)
+Pie Number of slices to send: Send
Hi Christophe, Thanks this worked.
+Pie Number of slices to send: Send
And welcome to the Ranch
+Pie Number of slices to send: Send
Thank you
F is for finger. Can you stick your finger in your nose? Doesn't that feel nice? Now try this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1261 times.
Similar Threads
Abstract inner class?
Overiding class variable through inheritance
Head First Java Inheritance and Polymorphism
overriding ignores cast ?? Please explain
Dan's exam doubt
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 06:04:08.