Sax
2013-09-01 17:36:12
So, I am having a bad time here. I watched the newboston video tutorials on objects and multiple classes and now I'm trying to do myself just to see if I got it.
My classes:
And this is the error I got:

I happen to have a class named apples which is the class that I copied from the tutorial but I don't see how I get this error.
Anyone?
Thanks everybody in advance :D
My classes:
package bucky;
public class bacon {
private String sport;
public void setSport(String sportname) {
sport=sportname;
}
public String getSport() {
return sport;
}
public void SaySport() {
System.out.printf("Really?? %S is my favourite sport too!", getSport());
}
}
package bucky;
import java.util.Scanner;
public class banana {
public void main(){
Scanner choco= new Scanner(System.in);
System.out.println("What is your favourite sport?");
String temp = choco.nextLine();
bacon object = new bacon();
object.setSport(temp);
object.SaySport();
}
}
And this is the error I got:
Error: Could not find or load main class bucky.apples
I happen to have a class named apples which is the class that I copied from the tutorial but I don't see how I get this error.
Anyone?
Thanks everybody in advance :D