Java-Default Value of Class Members

Default Value of Class Members The member variable is declared but not defined, it is always default-initialized to a zero of the appropriate. Following table shows variables types and their default values : Data Type Default value char 0 int / short / long / byte 0 float / double 0.0 String null Program Program Source class Data{ byte byt; int … Read more…

Java-Simple Class Construction

Simple Class Construction The class is nothing but a template for object you are going to create or it’s a blue print by using this we create an object. In simple word we can say it’s a specification or a pattern which we define and every object we define will follow that pattern. Here is … Read more…