-
March 16th, 2014, 09:12 PM
#61
Re: Still can not call my Subclass method returns. J2EE
Just tells me the program has exited.
-
March 16th, 2014, 09:13 PM
#62
Re: Still can not call my Subclass method returns. J2EE
These lines are still outside of the loop:
Code:
// readFile r = new readFile();
System.out.println("Please enter:\n 1 to add a business contact\n 2 to add a personal conatact"
+ "\n 3 to display the contacts \n 4 to Quit " );
int enter = in.nextInt();
I'm done for tonight. Back tomorrow.
Norm
-
March 16th, 2014, 09:16 PM
#63
Re: Still can not call my Subclass method returns. J2EE
I hae the loop exited correctlt now by removing 4 form the loop..... Still same issue with showing the contacts....
-
March 16th, 2014, 09:35 PM
#64
Re: Still can not call my Subclass method returns. J2EE
Could it be possible that I have an issue with my try blocks that read and import my txt files?
-
March 17th, 2014, 05:27 AM
#65
Re: Still can not call my Subclass method returns. J2EE
I don' think the try blocks would cause the problem that you describe.
Can you post a short sample session with a user? Something like this:
Ask the questions
user enters 1
do work for 1
Ask the questions
user enters 1
do work for 1
Ask the questions
user enters 1
do work for 1
Ask the questions
user enters 2
do work for 2
Ask the questions
user enters 3
do work for 3
Ask the questions
user enters 4
exit loop
Norm
-
March 17th, 2014, 11:46 AM
#66
Re: Still can not call my Subclass method returns. J2EE
Everything else works fine....... I can even open the txt file in notepad and everything is there... but the import and displaying it has the problem.
-
March 17th, 2014, 02:11 PM
#67
Re: Still can not call my Subclass method returns. J2EE
Is the problem with reading and displaying the contents of a file?
Norm
-
March 17th, 2014, 03:33 PM
#68
Re: Still can not call my Subclass method returns. J2EE
just displaying the txt file... I write to them correctly..... I can open files with notepad and see everything in there correctly.... But always displays 2 files instead of just one...
Look at previous replies........
-
March 17th, 2014, 03:39 PM
#69
Re: Still can not call my Subclass method returns. J2EE
Are you saying that there is no problems with reading and displaying the contents of a file?
The problem is with the program's logic: when a read and display request is made, it is done two times.
I asked for a sample user session in post#65. Can you make a list of the events in the order that they should happen when the program is executed? Not what is now happening, but what you want to happen.
Also post the current version of the code and a script for executing it for testing that will show the problem that you are describing.
Norm
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|