Confusion on the challenge question. finally or final keyword? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 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
14 Respostas
+ 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
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 šŸ‡®šŸ‡³
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