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:
Java Code:
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
()); }}
Java Code:
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:
Code:
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