Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 25-04-2009
Member
 
Join Date: Apr 2009
Posts: 79
Can we use static variable in other programming languages

Hello,

I have little unclear understanding about the static variable and static method, i want to know in what other programming languages we could use the static variables and method, am currently using static variable and method in the Java.

Does any have any idea about this.


Thanks in Advance
Reply With Quote
  #2  
Old 25-04-2009
Member
 
Join Date: Feb 2009
Posts: 39
Re: Can we use static variable in other programming languages

Hello,

Am also newbie to programing languages but as i know little about it we can use the Static variable in C,C++ and also even in the C# and as well as Java language but for the static method we could use only in the C# and Java language.
And we could access the static variable in the other classes if they are not private accessible.
Reply With Quote
  #3  
Old 25-04-2009
Member
 
Join Date: Jan 2009
Posts: 143
Re: Can we use static variable in other programming languages

static member variables can be used without instantiating a class, same with static member functions. main is static, so no class has to be instantiated for it to be called.

static variables are used when only one copy of the variable is required.
Also in java there are no global variables hence static variables serve this purpose.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Can we use static variable in other programming languages"
Thread Thread Starter Forum Replies Last Post
Scope of Object or variable in Object oriented Programming Languages Dėfrim Software Development 3 08-01-2011 06:20 AM
Servlet static variable Sheenas Software Development 5 06-03-2010 11:24 AM
Help needed for the Programming Languages! pushpendra Software Development 5 15-01-2010 05:01 PM
Static variable initialization Dilbert Software Development 3 31-12-2009 01:38 PM
What is Global Variable static? Declaring static variable instead of Global variable Reckon Software Development 3 25-04-2009 11:34 AM


All times are GMT +5.5. The time now is 08:53 PM.