You should google java tutorial, or:
Type: Posts; User: Time4Java
You should google java tutorial, or:
You could use a boolean value to determine wether or not your while loop needs to end,
boolean running = true;
Then you need to check if your while loop has...
What have you tried?
Perhaps you should do a google search for how to split a string, I'm sure you'll find something,
As for the big paragraph, maybe you should look into collections?
and what does it say, how does it stop you from compiling?
What is the exact error message that the compiler is giving you?
If you are new to java or programming I wouldn't go ahead and make a program that will be in charge of deciding wether or not to spend YOUR money online.
The chances that you make an error are...
Cornix, I've come across plenty of silly little programs made for learning from that come in a jar file, like a tetris clone, or snake,
Examples during tutorials, and such.
So that's a use for...
I think this might help you if you are having trouble with your syntax,
Common java mistakes,
If you are still having trouble with basic syntax, perhaps you should follow the tutorials listed on...
How to ask questions the smart way.
What output did you expect, and what output did you get? :)
Also, what are you doing in this part of your loop?
r <= puzzle.length-word.length();
Just reading through here I get the feeling you are rushing this.
Studying the code without knowing what is done and how will not help you as soon as you need to change anything.
So if you are...
Any specific problem?
You can create a method called public static void main, and use it like you would use public static void main(String args),
since they both are static, which is why you can use them without...
I know the feeling, i went through half of my first programming module(120 lesson hours) without getting it, and it can seem like your teacher isn't teaching you at all ;p
You just gotta get into it...
- Hey there, I'm not quite sure why you are making 2 Scanner objects, you can just use the one for both Strings/ints/characters etc,
having to type user_input for your Scanner might not be the...
I'l take care of that thanks, yes, square wasn't initialized, Found my answer ;)
--- Update ---
Is there a better way of making a custom shape(like the 4custom squares on top of each other,...
That's the thing, everything has been initialized properly, so the nullpointer exception doesn't make sense to me
LineShape shape = new LineShape(this);
This is what gives the...
Hi, I am currently trying to make a Tetris game, so far I've got a class drawing that extends a JPanel as my canvas, a class Square that is 1 square(20 by 20) and a class LineShape that should draw 4...
Please post your code here in between code tags, the # symbol.
You're welcome! You learn by doing ;)
you can use () to avoid using fresult for what it is not meant for, fresult is only supposed to store the result of everything together, if you get that out of the way I think you'll be alot closer...
the % modulus sign is used to get the remainder of a division, so if you divide 9 / 3 you get 0, if you divide 10/3 you get 3, but this isn't right, so if you do the division, and after that you do...
Yeah, i've learned that now ;)
By local I mean inside the method: boolean bool = false; then change the returns in the if statements with bool = true and at the end return bool;
So I'm trying to check if the new coordinates vs original coordinates are diagonal and 1 line further, and if there is a piece there(getNum()) if it's 2 lines further, so I'm trying to return a...
I'll close this now ;)
Thank you all for the response, I'm using miglayout and it all seems to work ;)
But I do have one more question, when using swing, why should I repaint(or overwrite paintComponent)?
So far I'm just...