Final keyword in java what is that? in simple language is that make float and dubal variable fix value 5.7 = 5.7? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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 Answers
+ 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