Free Games Forum
Free Games Games Forums Music Forums TV Forums

  Free Games Forum Home FORUM
HOME
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN
Rules & FAQ RULES / FAQ
REPORT SPAM

Free Games Forum: Game Technology: Java:
Serious question from me.

 

 


Van Jens
Veteran


Oct 10, 2007, 10:05 AM

Post #1 of 5 (301 views)
Shortcut
Serious question from me. Can't Post

I need to know what situations to use:
int
Strings
double
Basically, those types of commands or whatever.
Statments like:
do while
for
if
I'm in a Java programming class and I've basically been copying my buddy and I'd feel like an idiot asking my teacher the basics 1 month into the semester.
Here's the assignments I have to do:
http://dhseagles.kpdsb.on.ca/~sourtzis/ics3m0/JavaProgramming.htm
First two assignments, basically.


(This post was edited by Van Jens on Oct 10, 2007, 10:19 AM)



Peach Pit
Veteran / Moderator


Oct 10, 2007, 10:14 AM

Post #2 of 5 (300 views)
Shortcut
Re: [Van Jens] Serious question from me. [In reply to] Can't Post


Quote
int
Strings
double


Int = Use for a whole number with no decimal places.
Strings = Use for words
Double = Use for decimal places


Quote
do while
for
if


I only know VB, so I can't explain that one Java stylez.


bye.


Mr. Java
Newbie


Oct 11, 2007, 12:08 AM

Post #3 of 5 (291 views)
Shortcut
Re: [Van Jens] Serious question from me. [In reply to] Can't Post

Hello Van Jens, you can check out my Basic Java tutorial for how to use Integers(int), Strings and if..else. And for the rest, read the other tutorial.
You can check out my tutorial HERE.

I'd suggest read HERE too.


(This post was edited by Mr. Java on Oct 11, 2007, 12:09 AM)


Real1ty
Senior Member


Oct 13, 2007, 4:51 AM

Post #4 of 5 (279 views)
Shortcut
Re: [Peach Pit] Serious question from me. [In reply to] Can't Post


In Reply To



Quote
do while
for
if


I only know VB, so I can't explain that one Java stylez.

Okay, I've never used "do" along with a while loop.

Code
 while(boolean) 
{
does whatver is here while the boolean isnt false
}

for(int = intName; expression that tells the loop when to stop, like i > 0; what you want int i to do in each iteration of this loop, like i= i+1)
{
repeats whats in here till that expression is false
}

if(boolean)
{
do this
}



"It worked, idk how. It probably wasn't healthy considering one time it bleed."
~coolgreencat


coolgreen44
Senior Member

Nov 5, 2007, 12:21 PM

Post #5 of 5 (241 views)
Shortcut
Re: [Real1ty] Serious question from me. [In reply to] Can't Post

This is pretty damn old but i will post here anyway, for great justice. (Since my post count has seemingly died, although I really do not care anymore since I never come on, but let us continue.)


Quote
Int = Use for a whole number with no decimal places.
Strings = Use for words
Double = Use for decimal places


That.


Quote
do while
for
if


Use if for simple statements that you what to run once. Like if A = true run this and your done.

Do While is for like a countdown. You want something to keep running intil the condition is met. It will keep repeating the same code intill like 5 > x or something.

or atleast thats what I am thinking right now. Laugh I am be screwed up, I can only really think properly when I have a file open and I am looking at it.


Cybernations

 
 
 


Search for (options) Web Design by Web Ideas - Page loaded in: 0.12 s on (CGI/1.1)