Results 1 to 3 of 3
Thread: Java Class Error
- 07-26-2011, 04:56 PM #1
Member
- Join Date
- Jul 2011
- Posts
- 10
- Rep Power
- 0
Java Class Error
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
- 07-26-2011, 04:58 PM #2
Crossposted: Class Error
How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
- 07-28-2011, 07:57 AM #3
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Never encourage people to answering on such threads.
Similar Threads
-
Java Class Not Found Error?
By Ethan in forum New To JavaReplies: 0Last Post: 03-20-2011, 06:33 PM -
Error: The java class is not found:
By Karthika in forum New To JavaReplies: 2Last Post: 01-14-2011, 06:03 AM -
Compilation Error in basic java class
By ruchir123 in forum New To JavaReplies: 7Last Post: 11-21-2010, 11:23 PM -
Java Error Class Help !!
By rons_sacramental in forum New To JavaReplies: 2Last Post: 05-10-2010, 02:42 AM -
Cast Error Caught (change) Class is really: java.lang.String
By barney in forum Advanced JavaReplies: 1Last Post: 08-02-2007, 04:07 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks