• +91 9723535972
  • info@interviewmaterial.com

Java Interview Questions and Answers

Question - An application needs to load a library before it starts to run, how to code?

Answer - One option is to use a static block to load a library before anything is called. For example, class Test { static { System.loadLibrary("path-to-library-file"); } .... } When you call new Test(), the static block will be called first before any initialization happens. Note that the static block position may matter.

Comment(S)

Show all Coment

Leave a Comment




NCERT Solutions

 

Share your email for latest updates

Name:
Email:

Our partners