aspose file tools*
The moose likes Java in General and the fly likes Variables Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Variables" Watch "Variables" New topic
Author

Variables

jose chiramal
Ranch Hand

Joined: Feb 12, 2010
Posts: 266
IS there any difference between class variables and static variables , local variables and automatic variabes ?

pete stein
Bartender

Joined: Feb 23, 2007
Posts: 1561
jose chiramal wrote:IS there any difference between class variables and static variables , local variables and automatic variabes ?



How about letting us know your thoughts first after you've reviewed Google and tutorials. So, what do you think?

Best of luck!
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Automatic variables ?


[My Blog]
All roads lead to JavaRanch
jose chiramal
Ranch Hand

Joined: Feb 12, 2010
Posts: 266
Automatic variables are also known as local variables ( http://en.wikipedia.org/wiki/Automatic_variable)


Class variable and static variables are the same.

Please correct me incase am wrong.
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14104
    
  16

The term "automatic variable" comes from C and C++ and is not commonly used in Java.

Sun's tutorial about variables tells you everything about different kinds of variables.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
sai prashanth
Greenhorn

Joined: May 04, 2010
Posts: 18
See if this helps:

1. Instance Variables (A variable defined in a class and could be visible outside the scope of the class too- also called Class variable, can be static, final, private, public transient, volatile)
2. Local variables (When the scope of the variable is limited to a method and is not available outside, only possible access modifier is final)
Lee Eun-Soo
Greenhorn

Joined: Dec 02, 2009
Posts: 2
jose chiramal wrote:IS there any difference between class variables and static variables , local variables and automatic variabes ?



well,in my opinion,class variable need to home like new classname(); keyword(?). but static variables can be accessed by using classname like classname.variablename;

sorry for my poor english abilty hAHA
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Variables