answersLogoWhite

0


Want this question answered?

Be notified when an answer is posted

Add your answer:

Earn +20 pts
Q: What is difference between static block and constructor?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is a static block?

A static block is a code block defined with the 'static' keyword and is not inside others blocks. The static block is executed when the class is first loaded and the main purpose is perform all the initialization that may not be appropriate inside a constructor.


What is the format of java file?

Class Ram { static {} //static block to execute something before main method Ram() //constructor {} {} //init block public static void main(String ss[]) { } other methods }


Difference between cross section and block diagram?

difference between cross section and block daigram


What is the difference between byte and block?

2352 bytes (the size of a block)


What is the difference between fault block mountains and rift valleys?

Diference between foul and block mountain


What is the difference between a carton and a block?

A carton has 24 drinks in it and a block has 30


What is the difference between a 283 small block and a 350 small block?

67ci


What is the difference between block and modified block style?

mrs. okelley is mean


Is there a difference between 454 Chevy block and a corvette 454 block?

yes there is.


What is the difference between consructor and function in java?

Functions and Constructors are similar in many ways. They can have arguments, they can have any amount of code, they can access the class's variables etc. the only difference is that a method in java needs to mandatorily have a return type but a Constructor in java cannot have a return type. It always creates and returns an object of the class for which it is the constructor. You cannot return a value from a constructor explicitly and if you try to do that, the compiler will give an error. The system knows that the purpose of the constructor is to create an object of the class and it will do the same irrespective of whether you declare a return type or not.


Difference between block and semi block letter?

A semi-block letter is less formal than a block letter.


What is the difference between the tee off marker or the tee block in golf?

There is no difference.