When you start typing in the middle of your screen is it on a new line of code right underneath or above? Or is it in the same line of code that you have to scroll over and see?
Type: Posts; User: Robertgif
When you start typing in the middle of your screen is it on a new line of code right underneath or above? Or is it in the same line of code that you have to scroll over and see?
Can you try and describe you're problem with a few more details?
Hi,
You're problem might be fixed with this: But I'm not sure what your describing.
with NetBeans 7.0, this is the "Line Wrap" option.
Go to "Options" / "Editor" / "Formatting", and set "Line...
Hahahha, Thank you very much, that cleared things up quite a lot, and it also made clear to me how the Math class worked.
Thanks so much!
class PrePostDemo {
public static void main(String[] args){
int i = 3;
i++;
System.out.println(i); // "4"
++i;
System.out.println(i); ...
Hello and thank you for coming and reading my post. I had a question regarding class variables and constructors. I'll post some code so I can show what I mean:
Case 1.)
public class Shape {...
What don't you understand about calling methods? Is there a specific issues you have with them, or a specific issue?
This is not too valid to your question, but think about moving this if() statement, you have it after you imput both the first and the second number, so the user is not sure which number they imputed...
This is really not important at all, but you write:
table = 0.00 twice,
once when you initialize the variable and once again when you are about to do your if statements.
I can just go look this up if I have to but I might as well ask, what is Javadoc?
Is there a general rule of thumb for tabbing?
Thanks for the advice on the camel-case naming, i'll keep that in...
Hello all, as I continue coding, I have gone back over some code that I wanted to encapsulate. I made all my instance variables private and made a lot of new public methods that would be used to set...
If it helps, look at each possible answer and backtrack it through the code. Working backwards might help you from getting confused.
While i'm still learning I have just been using the command prompt to run everything, help me understand how the coding really works, but thanks!
Alright! Thanks so much!
I was getting rather frustrated so I went to go do some general reading on java and it kind of hit me like an epiphany. <:-P
I was declaring my player objects inside of...
Alright, thanks for the suggestions.
So this was my original code:
public void startFight() {
while (fighter1.health > 0 & fighter2.health > 0) {
fighter1.attack();
fighter2.attack();...
Thank you Norm, but I've read this when I was researching the problem before I made the original post and I can't figure out what is wrong with the line of code or why it has a null value.
The...
Okay sorry, Ill post the other two classes that are involved in the program:
Here is the player class which I don't believe has an error in it:
public class player{
int health;
char sex;...
Well... I don't know if this would be of much use to you, but maybe you can change it to what you need??
(your array) = (int) (Math.random() * 10)
I'm very new so i'm not sure if you can change...
Hello all! I JUST started coding java and I was just practicing and I came across an error:
Exception in thread "main" java.lang.NullPointerException
at...