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 8252367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T00:32:47+00:00 2026-06-08T00:32:47+00:00

After I read JLS section 12.4.2 . 2.If the Class object for C indicates

  • 0

After I read JLS section 12.4.2.

2.If the Class object for C indicates that initialization is in progress for C by some other thread, then release LC and block the current thread until informed that the in-progress initialization has completed, at which time repeat this step.

Does the current thread really need to release LC which acquired by some other thread ? Is this action safe? How many times initialization of class or interface will happen in a App?Thanks.

  • 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-08T00:32:49+00:00Added an answer on June 8, 2026 at 12:32 am

    The contract for the JVM is that the class has finished loading before any application thread is allowed to use the class. “Finished loading” means that all static initializers have completed (ie all static blocks have executed and static fields are initialized in the order in which they are coded)

    Classes are loaded when first used, so whatever thread that occurs in (implicitly) invokes the ClassLoader to load the class, and it blocks while the ClassLoader completes loading the class (as per above). Any other threads that happen to use the class while the class is being loaded, will also block waiting for the class to finish loading.

    Classes are loaded once per JVM start up.

    Note to pedants: Yes it is possible using ClassLoader kung fu to reload a class, but this explanation is not misleading.

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

Sidebar

Related Questions

After read a lot about ball physics, watch some examples and few days of
After googling and landing on SO and having read this other question Is it
after some processing my program shows a messagebox saying you can read a log
I just need some clarification on a line I read after running rvm requirements
I have this code from a javascript /+\uFF0B0-9\uFF10-\uFF19\u0660-\u0669\u06F0-\u06F9u/ after some read about php &
I'm starting with geocoding, and after read a few things I realize that are
I have some code which works after replacing read-string with load-string. It is good
I'm new to Objective-c and after having read some articles about good practices, it
In this example from MS , you'll notice that after we read a byte
After read the google map javascript v3 api,I found I am confused about some

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.