I heard learning that was hard. I hope your learning java first. :P
P.S Onisagi, what does the, "else if" condition do? I don't understand why I keep that in one line instead of doing an if statement then make a new line and do else statement.
Is there a way to disable the parsing error? It does not harm my program and not matter how much I fix it it won't go away. It's just annoying, not much of an issue."
Why don't you try and do Terrain yourself? The more you practice at it the more you'll get better at it. I suggest trying that WT thing on the events tab on the home page. I am going to try it too to improve my terraining skills. ^^
First I would like to say, I am sorry if I annoy you with these questions, I don't know an actual programming site that will help you with your questions. I just decided to post here because I know some of you can do some stuff like llou and onisagi. I think from progammers video's he does it too. :-)
I have a couple questions for any of you Java programmers. First, I'm reading about pasting Strings together using "+." Why would I need to do that, like what's the purpose of it. I guess right now it seems so useless.. Is it just to keep your code a bit more organized so one String variable does not get too over chaotic?
Second question. If I make a box that holds text in a video game like how do you know when to do /n? Like in Fallout 3 they have a certain amount of text before they do a /n. I know they don't use Java in their game, obviously. But surely they use some type of "/n" command. Here's an example if this wasn't understandable:
String showText = "The black-toast intolerant fox was furious. He couldn't drink milk and that upset him greatly. What would Mr. Fox do here now?"
^ In java there is no, "auto paragraph," so how do you know when to start a new line or "/n?"
Actually I forgot to add the code that calculates the square root. Thanks for pointing that out.
Here's the finished code:
classSquareroot{publicstaticvoidmain(String[]args){intletterX=225;System.out.println("The square root of "+letterX+" is "+Math.sqrt(letterX)+".");intletterY=412;System.out.println("The square root of "+letterY+" is "+Math.sqrt(letterY)+".");}}
I know this probably isn't useful to any of you, but I was asking how to clean it up and it got answered. Progammer found a little mistake I did so I figured I would just fix my mistake and correct it so you aspiring programmers don't think what I did was correct. O_O
I am learning Java programming and recently have been learning a ton about variables. It's very simple stuff but I am just wondering if anyone could give some suggestions on how to clean this up, it looks kind of messy. Even some tips on what else I could add to it to kind of expand my learning would be helpful. :)
Here's the code:
[code]class Squareroot {
public static void main(String [] args) {
int letterX = 225;
System.out.println("Integer X's square root is "
+ letterX
+ "."
);
int letterY = 412;
System.out.println("Intergy Y's square root is "
+ letterY
+ "."
);
}
}[/code]
0
@Aenigma: Go
There's adblockers for many different browsers available.
0
Thanks guys, that made it easy to understand. ^^.
I believe the technical term is squiggly bracket marks. ^^
0
I heard learning that was hard. I hope your learning java first. :P
P.S Onisagi, what does the, "else if" condition do? I don't understand why I keep that in one line instead of doing an if statement then make a new line and do else statement.
0
@Keyeszx: Go
0
Heres another one:
Is there a way to disable the parsing error? It does not harm my program and not matter how much I fix it it won't go away. It's just annoying, not much of an issue."
0
Hey Keyeszx,
Why don't you try and do Terrain yourself? The more you practice at it the more you'll get better at it. I suggest trying that WT thing on the events tab on the home page. I am going to try it too to improve my terraining skills. ^^
0
Hey guys,
First I would like to say, I am sorry if I annoy you with these questions, I don't know an actual programming site that will help you with your questions. I just decided to post here because I know some of you can do some stuff like llou and onisagi. I think from progammers video's he does it too. :-)
I have a couple questions for any of you Java programmers. First, I'm reading about pasting Strings together using "+." Why would I need to do that, like what's the purpose of it. I guess right now it seems so useless.. Is it just to keep your code a bit more organized so one String variable does not get too over chaotic?
Second question. If I make a box that holds text in a video game like how do you know when to do /n? Like in Fallout 3 they have a certain amount of text before they do a /n. I know they don't use Java in their game, obviously. But surely they use some type of "/n" command. Here's an example if this wasn't understandable:
String showText = "The black-toast intolerant fox was furious. He couldn't drink milk and that upset him greatly. What would Mr. Fox do here now?"
^ In java there is no, "auto paragraph," so how do you know when to start a new line or "/n?"
0
@SouLCarveRR: Go
I don't know how to do functions yet. I am just a beginner at this, as in started 4 days ago. =)
0
@progammer: Go
Actually I forgot to add the code that calculates the square root. Thanks for pointing that out.
Here's the finished code:
I know this probably isn't useful to any of you, but I was asking how to clean it up and it got answered. Progammer found a little mistake I did so I figured I would just fix my mistake and correct it so you aspiring programmers don't think what I did was correct. O_O
0
@SouLCarveRR: Go
thanks. How did you do that formatting?
0
I am learning Java programming and recently have been learning a ton about variables. It's very simple stuff but I am just wondering if anyone could give some suggestions on how to clean this up, it looks kind of messy. Even some tips on what else I could add to it to kind of expand my learning would be helpful. :) Here's the code:
[code]class Squareroot { public static void main(String [] args) { int letterX = 225; System.out.println("Integer X's square root is " + letterX + "." ); int letterY = 412; System.out.println("Intergy Y's square root is " + letterY + "." ); } }[/code]
0
Do you mind adding the map to your post? Last time I downloaded from Mediafire I got a huge virus.
0
My first pair of jeans. Ever. I'm also getting gift cards!