Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8894033
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T23:23:46+00:00 2026-06-14T23:23:46+00:00

Recently in a lot of programs I’ve been looking at, I’ve noticed static {

  • 0

Recently in a lot of programs I’ve been looking at, I’ve noticed

static {
    //some code here
}

I’m just looking for some information about this particularly, I’m used to blocks of code all being in methods, or simply classes, does this simply set all code within the block with a static modifier, or is there something more to it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T23:23:47+00:00Added an answer on June 14, 2026 at 11:23 pm

    This might be a duplicate question from
    Static Initialization Blocks

    The static block only gets called once, no matter how many objects of that type you create.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been working a lot with C# recently, and I've noticed that most code
I noticed that in a lot of the programs I have been modifying recently
I've recently been doing a lot of Objective-C programming, and just got back into
I've been reading about MVC a lot recently, because I need to learn how
I seem to have been running this issue a lot recently. How is this
I've been doing a lot of reading about DTO's recently, having never used them
I've been writing a lot recently about Parallel computing and programming and I do
I've recently been writing some basic command-line programs (I want to keep my skills
I've been using extension methods a lot recently to help make my code be
I've been using Eclipse a lot recently, and haven't had any problems with it.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.