Results 1 to 3 of 3

Thread: Can we use static variable in other programming languages

  1. #1
    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

  2. #2
    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.

  3. #3
    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.

Similar Threads

  1. Replies: 3
    Last Post: 08-01-2011, 06:20 AM
  2. Servlet static variable
    By Sheenas in forum Software Development
    Replies: 5
    Last Post: 06-03-2010, 11:24 AM
  3. Help needed for the Programming Languages!
    By pushpendra in forum Software Development
    Replies: 5
    Last Post: 15-01-2010, 05:01 PM
  4. Static variable initialization
    By Dilbert in forum Software Development
    Replies: 3
    Last Post: 31-12-2009, 01:38 PM
  5. Replies: 3
    Last Post: 25-04-2009, 11:34 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,242,518.64871 seconds with 17 queries