Hi Everyone . I'm beginner in Java and use Ubuntu 11.4
I created Class Event and Then Create UseSimpleEvent File For Create object (Created 2 File ) .
public class Event { private int eventGuests; public void displayEventGuests() { JOptionPane.showMessageDialog(null, "Event Guests :"+ eventGuests); } public void inputEventGuests() { char inChar; String guestsString = new String(""); guestsString = JOptionPane.showInputDialog(null, "Enter the Number of guests at your Event "); eventGuests = Integer.parseInt(guestsString); } } public class UseSimpleEvent { public static void main(String[] args) { Event anEvent = new Event(); anEvent.inputEventGuests(); anEvent.displayEventGuests(); } }
I can compile Event.java without Error , but When I want to compile UseSimpleEvent.java my compiler return Error That
UseSimpleEvent.java:5: cannot find symbol
symbol : class Event
location: class UseSimpleEvent
Event anEvent = new Event();
^
UseSimpleEvent.java:5: cannot find symbol
symbol : class Event
location: class UseSimpleEvent
Event anEvent = new Event();
^
2 errors