Ask coding questions

← Back to all posts
How to use 2 classes in java?
blakejoseph (0)

Trying to get Odometer class and sample1 class to both work. I can name one main but it still wont work for the second class. Can anyone help with this?

Coder100 (18882)

You are doing it wrong. Odometer class is in the right place, Now,, your entry point is non existant. So create a file and add:

public class Main {
 // whatever code