Computer Science Canada Unusual Error Message PLZ HELP |
Author: | shlubster [ Mon Sep 08, 2008 5:25 pm ] |
Post subject: | Unusual Error Message PLZ HELP |
Hi I am new to the java programming language ( 1 month of on and off programming and now im really trying to learn) and when i was programming i got this error in my output area when trying to execute a program i am using JCreator LE --------------------Configuration: <Default>-------------------- How Old are You? 12 Do you have a coupon? (Y/N) Exception in thread "main" java.lang.NullPointerException at TicketDiscout.main(TicketDiscout.java:23) Process completed. If you recognize this error please help, if you need my full code then tell me Thanks |
Author: | Insectoid [ Mon Sep 08, 2008 5:33 pm ] |
Post subject: | RE:Unusual Error Message PLZ HELP |
Yes, we really need your code (I don't even know Java, and I know we need your code). Giving us the output doesn't matter, we can figure out the output on our own (well, not me, but people who know Java) I suppose you broke some rule or other in the language... Anyways, hope somebody comes along and helps you! |
Author: | btiffin [ Mon Sep 08, 2008 5:56 pm ] | ||
Post subject: | RE:Unusual Error Message PLZ HELP | ||
Hi, Yep, we'll need to see the code. And as it turns out, a null pointer exception is not that unusual. Not during development at least. Line 23 inside TicketDiscount.java is trying to access something through a variable that isn't pointing anywhere. Cheers, Brian P.S. When you post your code, use bbcode code tags.
|
Author: | Witchcraft [ Mon Sep 08, 2008 8:24 pm ] |
Post subject: | RE:Unusual Error Message PLZ HELP |
Shlubster, are you by any chance the friend of the really good programmer who goes by the name whos the who? He mention something about you. If your half as good as him, then I can't wait to see what kinds of programs you can write. I love his games, the last one he posted was amazing, the graphics aren't that great but its deep, and I might even say that I prefer it over games like bioshock, call of duty, and crysis! Anyways let me know soon. |
Author: | syntax_error [ Mon Sep 08, 2008 8:31 pm ] |
Post subject: | Re: RE:Unusual Error Message PLZ HELP |
Witchcraft @ Mon Sep 08, 2008 8:24 pm wrote: Shlubster, are you by any chance the friend of the really good programmer who goes by the name whos the who? He mention something about you. If your half as good as him, then I can't wait to see what kinds of programs you can write. I love his games, the last one he posted was amazing, the graphics aren't that great but its deep, and I might even say that I prefer it over games like bioshock, call of duty, and crysis! Anyways let me know soon.
There is a pm system for this type of messages, the topic area is not a chat room. Please do not take this in a harsh manner. |
Author: | Witchcraft [ Mon Sep 08, 2008 9:02 pm ] |
Post subject: | RE:Unusual Error Message PLZ HELP |
my mistake, I thought I clicked pm, but I must not have loaded the page, and I didn't realize, causing me to post on the thread. Once again sorry about that irrelevant comment, (it was suppost to be a joke, cause he actually knows me) anyways back on topic, these two previous commenters are right. YOU NEED TO SHOW YOUR CODE IF YOU WANT HELP! |
Author: | shlubster [ Tue Sep 09, 2008 7:42 pm ] | ||
Post subject: | Re: Unusual Error Message PLZ HELP | ||
Hey this is my code
thanks for the help |
Author: | Insectoid [ Tue Sep 09, 2008 9:12 pm ] | ||
Post subject: | Re: RE:Unusual Error Message PLZ HELP | ||
btiffin @ Mon Sep 08, 2008 5:56 pm wrote: Hi,
P.S. When you post your code, use bbcode code tags.
|
Author: | btiffin [ Wed Sep 10, 2008 12:08 am ] | ||
Post subject: | Re: Unusual Error Message PLZ HELP | ||
Umm, findInLine(".") ok, I can't find the details of the regex and bounds that findInLine is using and what it returns. I'd guess null or some other rot. Yep. Just found it. The change occurred between 1.5 and 1.6 implementations of findInLine. Your code would work with Java 1.5 (or Java 5 as some may call it - which I find a little bogus, seeing as it's all still version 1 of the language - but that is just an old guy rambling complaint - deluding people to think that it's ooohh so advanced - bogus I say). ![]() A suggested fix would look like
But I'd rework that even. It'll be a good exercise. Try and simplify the expression to something you feel comfortable reading. Cheers |
Author: | shlubster [ Wed Sep 10, 2008 6:18 pm ] |
Post subject: | Re: Unusual Error Message PLZ HELP |
Hey What is BBcode Code tags? Thanks |
Author: | Insectoid [ Wed Sep 10, 2008 6:38 pm ] |
Post subject: | RE:Unusual Error Message PLZ HELP |
They are little bits of code you type into your message that do things like underlining, italics, bold, colors, code, syntax, and more. Thy usually go like this [effect]stuff here gets affected[/effect] For example: for green text, type (color=green) and (/color), but with [], not (). |
Author: | Zren [ Wed Sep 10, 2008 6:39 pm ] | ||
Post subject: | Re: Unusual Error Message PLZ HELP | ||
Enter this in your message surrounding code:
It's purpose is for others to be able to read your program source easier. |
Author: | Insectoid [ Wed Sep 10, 2008 6:40 pm ] |
Post subject: | RE:Unusual Error Message PLZ HELP |
darn it Zren, I was editing my post! Now the BBcode doesn't work and I look bad! People these days...(Sarcasm) |
Author: | btiffin [ Wed Sep 10, 2008 8:37 pm ] | ||
Post subject: | Re: Unusual Error Message PLZ HELP | ||
shlubster; The next time you post, check beside the Font Colour ... Font face buttons. You'll see More Tags Hover over any of the entries, and just above the text edit area, the system will show you what to type to get that special effect. If you click, the system will insert the tags, but you usually have to muck around to get the ending tag in the right place. I usually just type them where I want them, but the hover can give you the hints of what is available. For instance, to get the bold More Tags, I used
Cheers |