Results 1 to 3 of 3
Thread: need help with java program
- 09-13-2008, 01:39 AM #1
Member
- Join Date
- Sep 2008
- Posts
- 16
- Rep Power
- 0
need help with java program
i have to create a program that will output informatin of a group. the group will have a groupname and studnets in the group. right now i have a student file, a group file, and the app file. my professor was telling me i was doing evenrything right, and it sort of is working, but the problem is this:
student names are inputed in the app file, then i take them from the app file and pt them into the group file to create a group. but when i output the code in the app, i get the right name for the group, but for my studnets i get like an address like this "student@12dacd1". i'm not sure how to fix this. so any help is appreciated
- 09-13-2008, 01:47 AM #2i get like an address like this "student@12dacd1".
Add a toString() method to your class to return what you want to see. Read the API doc for the Object class's toString method so you code it correctly when you override it. If you are using Java 1.6 (maybe also 1.5) add @Override before the definition of the method to have the compiler check that you have correctly coded the override.
- 09-13-2008, 01:53 AM #3
Member
- Join Date
- Sep 2008
- Posts
- 16
- Rep Power
- 0
Similar Threads
-
Java Program
By littleBean in forum New To JavaReplies: 7Last Post: 07-22-2008, 12:07 AM -
How to execute an External Program through Java program
By Java Tip in forum java.ioReplies: 0Last Post: 04-04-2008, 03:40 PM -
New to Java Program
By jvasilj1 in forum New To JavaReplies: 1Last Post: 02-05-2008, 08:22 AM -
How to execute an External Program through Java program
By JavaBean in forum Java TipReplies: 0Last Post: 10-04-2007, 10:33 PM -
java program
By nehasahu in forum New To JavaReplies: 5Last Post: 07-12-2007, 12:05 PM
Bookmarks