Home arrow static arrow Java Programming [Archive] - again i need help guys
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - again i need help guys
This topic has 42 replies on 3 pages.    « Previous | 1 | 2 | 3 | Next »

Posts:21,718
Registered: 98-02-20
Re: again i need help guys  
Aug 9, 2004 1:36 PM (reply 15 of 42)



 
did not help & still get the infinite loop !!

Wait a second -

if you're in an infinite loop, that means the exception ISN'T being thrown, otherwise your execution would be over. Right? You're probably getting an infinite loop because of another correction that you tried to stick in there. Take whatever you did out and try again.

No insult intended, pop-rage, but if you thrash around like this you'll never get anywhere.

More important than fixing this trivial problem, do you understand how I arrived at the recommendation I did? That's the thing that will serve you well long after this trivial problem is forgotten.

%
 

Posts:29
Registered: 11/7/03
Re: again i need help guys  
Aug 9, 2004 1:36 PM (reply 16 of 42)



 

Author: paulcw

no paulcw am done with the exception i moved the sentence & the exception was over but now it does not work ????

it seems as i sai before "an infinite loop" .

am really lost .
 

Posts:21,718
Registered: 98-02-20
Re: again i need help guys  
Aug 9, 2004 1:38 PM (reply 17 of 42)



 
What do you need a Swing UI for? You can write this to work on command line input first.

Your whole problem stems from an unwillingness to break a complex thing into simpler chunks.

You don't need the Swing UI here. Throw it away until you get that essential part working on the command line.

%
 

Posts:458
Registered: 7/1/03
Re: again i need help guys  
Aug 9, 2004 1:38 PM (reply 18 of 42)



 
poprage:

Do they teach you guys how to use a debugger and a quality IDE like eclipse these days or are you still working with command line and text editor?
 

Posts:458
Registered: 7/1/03
Re: again i need help guys  
Aug 9, 2004 1:39 PM (reply 19 of 42)



 
What do you need a Swing UI for? You can write this
to work on command line input first.

Your whole problem stems from an unwillingness to
break a complex thing into simpler chunks.

You don't need the Swing UI here. Throw it away until
you get that essential part working on the command
line.

%

Its, quite obviously, an assignment man. =)
 

Posts:21,718
Registered: 98-02-20
Re: again i need help guys  
Aug 9, 2004 1:39 PM (reply 20 of 42)



 
"... am done with the exception..."

Because of the earlier advice you were given?

Are you addressing your questions to paulcw now because he's "nice"?

%
 

Posts:21,718
Registered: 98-02-20
Re: again i need help guys  
Aug 9, 2004 1:40 PM (reply 21 of 42)



 
Its, quite obviously, an assignment man. =)

Obviously.

But get the essential part of the assignment working and THEN put it in the Swing UI. Once you have that working, you can concentrate on the Swing part.

Divide and conquer, baby. That's what computer science (and all problem solving) is all about.

%
 

Posts:21,718
Registered: 98-02-20
Re: again i need help guys  
Aug 9, 2004 1:41 PM (reply 22 of 42)



 
Do they teach you guys how to use a debugger and a
quality IDE like eclipse these days or are you still
working with command line and text editor?

Gawd, don't recommend Eclipse. He doesn't know Java yet. It'll just be two complex things he doesn't know. CLASSPATH is hard enough without throwing Eclipse in the mix.

%
 

Posts:12,831
Registered: 2/22/00
Re: again i need help guys  
Aug 9, 2004 1:44 PM (reply 23 of 42)



 

no paulcw am done with the exception i moved the
sentence & the exception was over but now it does not
work ????

Well then as others have said, the previous change(s) did work and now you're on to another problem (a problem that you always had but you didn't notice before because of the NullPointerException).

You thought that you'd just type in your code and it would work fine, didn't you? Ah, the classic first-timer panic is setting in now...

Get used to it. Most of your time as a programmer you're going to be hunting down bugs. If you're a professional programmer, you'll spend more time in boring meetings, and after that you'll spend a lot of time trying decode cryptic business-ese documents. But after that you'll be debugging. Don't be discouraged if your code doesn't work at first...it never does...

it seems as i sai before "an infinite loop" .

How do you know it's an infinite loop? Did you run it through a debugger? Are you printing some kind of trace?
 

Posts:458
Registered: 7/1/03
Re: again i need help guys  
Aug 9, 2004 1:44 PM (reply 24 of 42)



 
Eclipse is quite easy to use right out of the box. I managed to explain it to my 14 year old brother (who is just starting) in abotu half an hour.
 

Posts:458
Registered: 7/1/03
Re: again i need help guys  
Aug 9, 2004 1:45 PM (reply 25 of 42)



 

Author: paulcw

no paulcw am done with the exception i moved the
sentence & the exception was over but now it does not
work ????

it seems as i sai before "an infinite loop" .

am really lost .

Post the revised code.
 

Posts:826
Registered: 7/1/03
Re: again i need help guys  
Aug 9, 2004 1:45 PM (reply 26 of 42)



 
i hope the new nick is treating you well.

/k1
 

Posts:12,831
Registered: 2/22/00
Re: again i need help guys  
Aug 9, 2004 1:46 PM (reply 27 of 42)



 

Are you addressing your questions to paulcw now
because he's "nice"?

No need for insults, duffymo.

I'm not nice. I'm a real *******, trying to get on the next "most arrogant poster" list. Listen:

STOMP! iiiieeeee...

I just stomped on an adorable puppy. That's how big a ******* I am.
 

Posts:21,718
Registered: 98-02-20
Re: again i need help guys  
Aug 9, 2004 1:48 PM (reply 28 of 42)



 
LOL!

You've convinced me, paulcw. You move to the top of the arrogant list!

(Please don't hurt me....or my basket of puppies)

%
 

Posts:21,718
Registered: 98-02-20
Re: again i need help guys  
Aug 9, 2004 1:51 PM (reply 29 of 42)



 
Eclipse is quite easy to use right out of the box. I
managed to explain it to my 14 year old brother (who
is just starting) in abotu half an hour.

I agree that Eclipse can be pretty easy to use.

CLASSPATH is the #1 newbie problem that I see.

Failing to understand that Eclipse ignores the system CLASSPATH and demands that users add JARs to the build path in an Eclipse-specific way is another classic newbie problem.

Maybe pop-rage and your little brother will get away with it because the simple classes they're writing won't require 3rd party JARs. (OR they're both smart enough to figure out CLASSPATH.) If those are both true, then I withdraw my comment.

But the fact that pop-rage is having problems figuring out a NPE problem suggests to me that Eclipse will just muddy the waters. You don't need a debugger to figure out a NPE. (Might help with that infinite loop, though.) A few well-placed System.out.println statements might get him there, too. Shouldn't need a fancy debugger to figure out this problem.

I'll be happy to be proven wrong.

%
 
This topic has 42 replies on 3 pages.    « Previous | 1 | 2 | 3 | Next »