Sythe.Org Forums     Register     FAQ     Members List     Calendar     Mark Forums Read    
 
Sythe.Org Forums  
   Runescape Gold

Sythe.org — A Virtual Goods Trading Hub

Make real cash! buying and selling in-game items.

We have a no-scam policy.

You can make thousands playing your favourite games here at Sythe.org.

Just sign up an account and follow the rules!


Take me to

Runescape Markets

Other Game Markets

Support Center

Register an Account

Close
A Day 2 Exercise In Learning Java
Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 03-02-2011, 10:36 PM
Forum Addict
 
Join Date: Feb 2011
Location: USA
Posts: 255
Send a message via MSN to jamesm201
Default A Day 2 Exercise In Learning Java

Today we are going to use java to do a math problem.
type in

public class Add
{
public static void main (strings[]args)
{
int num;

num = 5;

system.out.print("the value of num is" );
system.out.println(num);
}
}

This creates a variable and tells the java program its there


Doing this you tell the java program what it's value is

if you noticed i put a ln after print in the system.out statement this tells it to put it with the one above and include it one one line so it looks like *The Value of num is 5*
__________________

Last edited by jamesm201 : 03-02-2011 at 11:22 PM.
Reply With Quote
  #2  
Old 03-02-2011, 11:03 PM
Forum Addict
BANNED
 
Join Date: Nov 2007
Posts: 328
Send a message via MSN to rsgold4u
Default Re: A Day 2 Exercise In Learning Java

More corrections. int num;

needs ; after your incorrect System.out.print statements.
Reply With Quote
  #3  
Old 03-02-2011, 11:23 PM
Forum Addict
 
Join Date: Feb 2011
Location: USA
Posts: 255
Send a message via MSN to jamesm201
Default Re: A Day 2 Exercise In Learning Java

what are you talking about?
__________________
Reply With Quote
  #4  
Old 03-02-2011, 11:36 PM
Forum Addict
BANNED
 
Join Date: Nov 2007
Posts: 328
Send a message via MSN to rsgold4u
Default Re: A Day 2 Exercise In Learning Java

Kids these days.

My post: Today, 06:03 PM
Your edit: Last edited by jamesm201 : Today at 06:22 PM.

Don't try to cover ur mistakes.
Reply With Quote
  #5  
Old 03-02-2011, 11:51 PM
Forum Addict
 
Join Date: Feb 2011
Location: USA
Posts: 255
Send a message via MSN to jamesm201
Default Re: A Day 2 Exercise In Learning Java

thanks dude i kind get blinded with those colored peaces with the /brown/color stuff that this fourm has
__________________
Reply With Quote
  #6  
Old 03-05-2011, 04:40 AM
spedico's Avatar
Active Member
$25 USD Donor New
 
Join Date: Feb 2011
Location: Finland
Posts: 191
Send a message via MSN to spedico
Default Re: A Day 2 Exercise In Learning Java

Try code tags..
Code:
hi
Would be easier to read.
__________________
Always ask for a PM
Reply With Quote
Reply



Cheap RS Gold Store  Runescape Gold

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

All times are GMT +1. The time now is 07:17 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.6.1