aspose file tools*
The moose likes Beginning Java and the fly likes Basic questions...Memory management and all Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Basic questions...Memory management and all" Watch "Basic questions...Memory management and all" New topic
Author

Basic questions...Memory management and all

arun mahajan
Ranch Hand

Joined: Dec 07, 2001
Posts: 305
I would like to ask following question and would appreciate if some one can answer them point wise:-
1. IS it bad idea of catching every exception and burying them their itself...(perhaps sound foolish but what is right?)
2. Am i writing a better code? I am sure there could be better way of writing my sendorder class...can you help me?
3. Is style of coding I am adopting is taking lot of memory?
4. Am i releasing the memory in better fashion?
5. will it be useful to call System.gc() after every call of sending my orders to sendorder class?
Please spare some moments and help me for these basic questions...
regards,
Arun
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Generally speaking arun, posting the same question again probably isn't the best thing to do to bring new or more attention to the question. You could always just add a response to the original question to bring it to the top of the pile again.
Also, I'd imagine that you'd get more and better responses if you were to break the problems and questions down a bit into simpler and singular considerations and questions. And then ask others to consider and respond to the isolated concepts seperately.
Concerning designing with exceptions, JavaWorld has an article called "Designing with exceptions" that you might appreciate.
Good Luck.


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
arun mahajan
Ranch Hand

Joined: Dec 07, 2001
Posts: 305
Thanks Dirk for your reply...I fully agree with you..but when you don't get answers even trying to put at a bit simpler fashion what else you will do..perhaps a desparate attempt is trying to ask the same question against a new thread to attract JGurus...
See though Javaranch has no obligation to answer my questions...my problems are not others problem..It is upto an individual if it attracts to him/her and would interested can answer..but I being a poor and novice in this area and on top of it i don't know any other better place to ask my stupid questions...I always get my answers from this forum and highly obliged...
I will like to apologise if I am breaching any norms but I doubt if I had any other option
Anyway thank you so much for your reference URL...
regards,
Arun
P.S.: BTW You know even now I haven't got all my questions(points) answered.
[ April 27, 2002: Message edited by: arun mahajan ]
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
Hello arun,
By no means, of course, was I discouraging asking any questions - especially not the seemingly stupid questions as they often lead to conversations that explain a fundamental concept well.
I'm suggesting, merely, that rather than hoping someone will dissect a large multifaceted question and address many small parts, I think you'll have more success at getting quality answers if the questions asked are simple and focused.
Now, concerning the article I referred to above, did it help to address some of your thoughts on exception handling design?
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
1) Exceptions should be handled however is appropriate for your application requirements.
2) Your code looks fine
3) see #2
4) see #2
5) forget that you ever heard of System.gc() (unless you are taking the certification). In 6 years of coding Java I had to use it once.


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Basic questions...Memory management and all