Creating Class with multiple methods and implementing AutoCloseable interface - Java Quiz Question


What will be the output of the following program?


A
S5 S5 O4 S4 O3 S3 S3
B
S5 S5 O4 S4 O3 S3 C4 c5 S5
C
S5 O4 O3 S3 O2 S2 O1 S1 S1
D
S5 O4 O3 S3 O2 S2 O1 S1 C2 C3 S3
E
Some other output
F
Compilation Error or Runtime Error