+ 2

Final keyword in java what is that? in simple language is that make float and dubal variable fix value 5.7 = 5.7?

11th Jun 2017, 9:23 AM
prashant vyas
prashant vyas - avatar
5 Antworten
+ 2
final keyword helps creating constants, a variable whose value is readonly and can't be changed. int x = 3; //normal variable x = 45; //allowed final int items=10; //a constant items = 11. //not allowed error
11th Jun 2017, 9:38 AM
देवेंद्र महाजन (Devender)
देवेंद्र महाजन (Devender) - avatar
+ 3
Yes dear
11th Jun 2017, 10:04 AM
देवेंद्र महाजन (Devender)
देवेंद्र महाजन (Devender) - avatar
+ 2
other values parameter not accept?
11th Jun 2017, 9:43 AM
prashant vyas
prashant vyas - avatar
+ 2
Elaborate your questions.
11th Jun 2017, 9:48 AM
देवेंद्र महाजन (Devender)
देवेंद्र महाजन (Devender) - avatar
+ 2
do you mean that final keyword make attribute values final? can not change after declare one time?
11th Jun 2017, 9:59 AM
prashant vyas
prashant vyas - avatar