+ 16

Confusion on the challenge question. finally or final keyword?

Here is one java challenge question in which asked that can we apply finally with Abstract Classes. Is it right? I know that variable, method and classes can be final but finally? https://www.sololearn.com/post/245605/?ref=app

17th Feb 2020, 2:25 PM
A͢J
A͢J - avatar
16 Respuestas
+ 6
Jayakrishna and Avinesh Yes that's what I was thinking. Rest can be final but abstract class can't be final. Also we use finally with try catch block. So here should be final. Right? So here is typo mistake and also don't know how this approved.
17th Feb 2020, 2:45 PM
A͢J
A͢J - avatar
+ 5
Avinesh finally always execute. Does not depend on exception.
18th Feb 2020, 5:22 PM
A͢J
A͢J - avatar
+ 4
An abstract class is a prototype and design metric, not for any implementation in the main subroutine! 😒
18th Feb 2020, 2:56 PM
Sanjay Kamath
Sanjay Kamath - avatar
+ 3
0_0 Mägár Sám Äkà Nüllpøïntêr Èxëcéptïön 'finally' is a keyword in Java which is used to execute a piece of code considering that the program might return an error or exception during execution.
18th Feb 2020, 5:21 PM
Avinesh
Avinesh - avatar
+ 3
🅰🅹 - Pʀᴏᴅᴜᴄᴛ Mᴀɴᴀɢᴇʀ I know, just realized after posting 😅
18th Feb 2020, 5:23 PM
Avinesh
Avinesh - avatar
+ 3
Avinesh 😂😂
18th Feb 2020, 5:25 PM
A͢J
A͢J - avatar
+ 3
Avinesh OMG just for a moment i think finally as a finalize method. Thanks @Avinesh for remind me my mistake. So Confusing by the way😬.
18th Feb 2020, 5:55 PM
0_O-[Mägár_Sám_Äkà_Nüllpøïntêr_Èxëcéptïön]~~
0_O-[Mägár_Sám_Äkà_Nüllpøïntêr_Èxëcéptïön]~~ - avatar
+ 3
🅰🅹 - Pʀᴏᴅᴜᴄᴛ Mᴀɴᴀɢᴇʀ finally I know that finally is not what I expect, but finally I'm able to understood that what finally really is.😬😁 o_O_0_o_O_0
18th Feb 2020, 6:51 PM
0_O-[Mägár_Sám_Äkà_Nüllpøïntêr_Èxëcéptïön]~~
0_O-[Mägár_Sám_Äkà_Nüllpøïntêr_Èxëcéptïön]~~ - avatar
+ 2
It may be approved on no.of likes only.. Once I find same type of question.. That make me confusion. So I make question this... https://www.sololearn.com/Discuss/2040901/?ref=app
17th Feb 2020, 2:51 PM
Jayakrishna 🇮🇳
+ 2
18th Feb 2020, 6:35 PM
A͢J
A͢J - avatar
+ 1
finally is not access modifier. So Should be final. I reported as typo.. A class can't be both final and abstract at same
17th Feb 2020, 2:32 PM
Jayakrishna 🇮🇳
+ 1
It should be final. Because as you said, the rest all can be final but we cannot use final with abstract classes.
17th Feb 2020, 2:34 PM
Avinesh
Avinesh - avatar
+ 1
It should be 'final'. You can report the question.
17th Feb 2020, 9:51 PM
Sonic
Sonic - avatar
+ 1
It is final key word it makes variable constant
19th Feb 2020, 1:07 AM
Nikhil Yadav
Nikhil Yadav - avatar