|
|
![]() |
| Thread Tools | Search this Thread |
#1
| |||
| |||
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 |
#2
| |||
| |||
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. |
#3
| |||
| |||
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. |
![]() |
|
Tags: programming languages, static method, static variable |
Thread Tools | Search this Thread |
|
![]() | ||||
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 |