Results 1 to 8 of 8
Thread: Need help with code
- 02-17-2011, 01:59 PM #1
Member
- Join Date
- Feb 2011
- Posts
- 5
- Rep Power
- 0
- 02-17-2011, 02:09 PM #2
How about you tell us what's wrong? What's happening? Are you getting an Exception? What did you expect to happen? What happened instead? Be specific.
When posting code, make sure you use the code tags. Check out other posts for examples of how to do that.
But here are the first couple of problems that pop out at me: you're trying to assign a String value to an int variable, then you're trying to print that variable outside of its scope.How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
- 02-17-2011, 02:14 PM #3
Member
- Join Date
- Feb 2011
- Posts
- 5
- Rep Power
- 0
Thx for the reply but thats the whole code i got from my teacher and she told me to find whats wrong with the code and make it to work
- 02-17-2011, 02:18 PM #4
How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
- 02-17-2011, 02:23 PM #5
Member
- Join Date
- Feb 2011
- Posts
- 5
- Rep Power
- 0
hehe not like that.
I dont understand were to begin to solve that
what i get in is the error messeage: lastNumber cannot be resolved to a variable
i have been trying to change the code but nothing helps.
- 02-17-2011, 02:24 PM #6
Okay, so what do you find when you google the error message?
I'll give you a hint: if you declare a variable inside a block (such as an if statement), you can't access it outside of that block. Just like you can't access a variable you declare in one method from another method.How to Ask Questions the Smart Way
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
- 02-17-2011, 02:29 PM #7
Member
- Join Date
- Feb 2011
- Posts
- 5
- Rep Power
- 0
Ok Thx I got it when you said it. I i had google it before but i relly didnt get then.
Thx again you have been really helpful
- 02-17-2011, 04:23 PM #8
Member
- Join Date
- Jan 2011
- Posts
- 27
- Rep Power
- 0
Similar Threads
-
Code to check if a piece of code is legal.
By vahshir in forum New To JavaReplies: 3Last Post: 08-30-2010, 04:21 AM -
can any one pls send me a sample code for calling a jsp code in swings
By sniffer139 in forum AWT / SwingReplies: 1Last Post: 03-04-2010, 11:19 AM -
Convert java code to midlet code
By coldvoice05 in forum New To JavaReplies: 1Last Post: 08-12-2009, 11:14 AM -
Convert java code to midlet code
By coldvoice05 in forum Advanced JavaReplies: 1Last Post: 08-09-2009, 01:21 PM -
Generating Code Automatically Using Custom code Template In Eclipse
By JavaForums in forum EclipseReplies: 1Last Post: 04-26-2007, 03:52 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks