What do u mean constructor in java ?



What do u mean constructor in java ?..

Answer / jeetesh

constructor is nothing but name of class name of the
constructor should be same
Main goal of constructor: is to initialize states of
an objects value or attributes values
while creating object to the class automatically
constructor will call
constructor in java:
1 name of constructor and name of class should be same
2 constructor it will call while
Creating object
3 constructor does not have return value
4 constructor cannot be final
5 constructors cannot be static if it is static means we
cannot create object to static
6 constructor cannot be inherit
7 constructor cannot be abstract
8 constructor first statement should be either super()
calling or this() calling
9 Overriding is not possible in case of constructor

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More Engineering AllOther Interview Questions

I am having 5 nos. ceiling fans in my home. if i switch on all fan at full speed say 5 , so Will my meter reading be runing fast ? OR if I keep all fans on very low speed, say 1, so meter reading will runing slowly. or it does not make any difference whether low or high. reading will remain same?

0 Answers  


Why it is a preferable option in parallelextender development ?

0 Answers  


5. Can you work well under deadlines or pressure?

0 Answers  


What is STP

0 Answers   Tech Mahindra,


2. A product selected for testing is equally likely to have been produced by one the 6 machines/processes. (i) Determine sample space ā€˜Sā€™ (ii) What is the probability that the product is from machine 1? (iii) What is the probability that the product is from machine 2 or machine 4? (iv) What is the probability that the product is from both machine 5 and machine 3? (v) What is the probability that the product is not from machine 6? (vi) What is the probability that the product is not from either machine 6 or machine 1?

0 Answers  






can any one send me the configuration of cisco 1841 router????/

0 Answers   ABC,


what is debugging?

0 Answers   HSBC, Wipro,


I DO HAVE APAST EXPERIENCE IN MY(SCHOOL/COLLEGE)WHERE I'VE HANDLED RESPONSIBILITY LIKE

0 Answers   Oracle,


Difference between strdup and strcpy in c language?

1 Answers  


what are the different types of database servers

0 Answers   IBM,


What is the full forms SDDC,TOR,DLRO,PPP,USW,AWWA,CMOS,SVI,

1 Answers  


How many of 14 digit numbers we can make with 1,2,3,4,5 that are divisible by 4. Repetitions allowed.

0 Answers  


Categories
  • Civil Engineering Interview Questions Civil Engineering (5085)
  • Mechanical Engineering Interview Questions Mechanical Engineering (4451)
  • Electrical Engineering Interview Questions Electrical Engineering (16632)
  • Electronics Communications Interview Questions Electronics Communications (3918)
  • Chemical Engineering Interview Questions Chemical Engineering (1095)
  • Aeronautical Engineering Interview Questions Aeronautical Engineering (239)
  • Bio Engineering Interview Questions Bio Engineering (96)
  • Metallurgy Interview Questions Metallurgy (361)
  • Industrial Engineering Interview Questions Industrial Engineering (259)
  • Instrumentation Interview Questions Instrumentation (3014)
  • Automobile Engineering Interview Questions Automobile Engineering (332)
  • Mechatronics Engineering Interview Questions Mechatronics Engineering (97)
  • Marine Engineering Interview Questions Marine Engineering (124)
  • Power Plant Engineering Interview Questions Power Plant Engineering (172)
  • Textile Engineering Interview Questions Textile Engineering (575)
  • Production Engineering Interview Questions Production Engineering (25)
  • Satellite Systems Engineering Interview Questions Satellite Systems Engineering (106)
  • Engineering AllOther Interview Questions Engineering AllOther (1379)