1Mediumgeneralโฑ 45sWhat is the purpose of the volatile keyword in Java?๐โผAMakes a variable immutableBEnsures visibility of changes across threadsCImproves performance via cachingDPrevents garbage collection
2Mediumgeneralโฑ 45sWhat does the finally block guarantee in a try-catch-finally statement?๐โผAIt never executes if an exception is thrownBIt executes only if no exception occursCIt executes regardless of whether an exception was thrown or caughtDIt replaces the catch block