Results 1 to 5 of 5

Thread: static variable In Java ?

  1. #1
    Registered
    Join Date
    Jan 2019
    Posts
    42

    static variable In Java ?

    Hello Dear,

    Please Tell Me What is the static variable In Java ?

  2. #2
    Registered
    Join Date
    Apr 2017
    Posts
    68
    Hello, static variables are declared with the static keyword in a class, but outside a method, constructor or a block. It is also known as Class variables. It reduces the memory footprint of the program.

    Thanks!

    javascript library

  3. #3
    Junior Registered
    Join Date
    Nov 2019
    Location
    Ludhiana
    Posts
    9
    There are three types of variables in Java:

    Local variable
    Instance variable
    Static variable

  4. #4
    Registered
    Join Date
    May 2020
    Posts
    64
    Here have it.
    The static variable in Java is variable which belongs to the class and initialized only once at the start of the execution. It is a variable that belongs to the class and not to object(instance ). Static variables are initialized only once, at the start of the execution.

    I hope it helps!
    Regards.

  5. #5
    Registered RH-Calvin's Avatar
    Join Date
    Mar 2017
    Location
    Forum
    Posts
    1,663
    Static variable in Java is variable which belongs to the class and initialized only once at the start of the execution. It is a variable which belongs to the class and not to object(instance ). Static variables are initialized only once, at the start of the execution.
    Cheap VPS Hosting | VPS Starting from $12 PER Year
    Cheap Dedicated Server | Unmetered Bandwidth | Free Setup and IPMI

Similar Threads

  1. restrictions that are applied to the Java static methods ?
    By maharanacab in forum Website Programming & Databases
    Replies: 0
    Last Post: 08-17-2019, 12:40 AM
  2. What is java static import?
    By priya01 in forum Website Programming & Databases
    Replies: 1
    Last Post: 08-12-2016, 02:54 AM
  3. variable parameter value In Python
    By matthee in forum Website Programming & Databases
    Replies: 0
    Last Post: 06-05-2013, 07:53 PM
  4. URL's with spaces in variable values
    By chromate in forum Search Engine Optimization
    Replies: 8
    Last Post: 10-16-2003, 04:04 PM
  5. Variable value for form text...
    By Stevens in forum Website Programming & Databases
    Replies: 4
    Last Post: 10-15-2003, 02:58 PM

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
  •