Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-05-2007, 11:49 PM
Member
 
Join Date: Jul 2007
Posts: 40
fernando is on a distinguished road
Help with variables in java
Hi, All the online/manual and online tutorials explain how to initially assign something to a variable, but how do you change it when the program is running? In BASIC something like "if a$ = 2 then b$ = 3"

Also how can you take a string, say an input and assign it to a variable instead of using "system.out.println"

But how do you do this in JAVA? I'm not used to high level programming - BASIC is about as high level as I know.

Thanks.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-06-2007, 07:51 AM
Senior Member
 
Join Date: Jul 2007
Posts: 1,189
hardwired is on a distinguished road
Code:
String input = reader.readLine(); String s = "hello world"; input = s;
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 08-06-2007, 06:03 PM
Member
 
Join Date: Aug 2007
Posts: 15
yiweiang is on a distinguished road
Code:
if(a$==2) { b$=3; }
is this what you are saying?
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
boolean variables ravian New To Java 3 12-31-2007 05:58 AM
Variables mew New To Java 3 12-11-2007 01:44 PM
variables-methods Warren New To Java 1 11-28-2007 05:14 PM
Problem with variables in java carl AWT / Swing 1 07-31-2007 08:50 PM
I do not know how to initialize the two variables Daniel Advanced Java 2 07-01-2007 05:42 AM


All times are GMT +3. The time now is 12:43 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org