Search This Blog

Tuesday, October 14, 2025

Java Closeable Interface methods

 Which of the following is a method of a Closeable interface?

a) void close (ByteStream ob)

b) void close (CharacterStream ob)

c) void close (FileStream file)

d) int close()

e) void close()


Created by Nancy K.A.N.

@00:36 15-Oct-2025

Monday, October 6, 2025

String Literals - 1

 Where JVM stores the string literals?

a) Stack memory

b) Special area on the stack

c) String constant pool

d) none of the above


Created by Nancy K.A.N.

@13:32 06-Oct-2025

Thursday, October 2, 2025

Java Closeable Interface

 Which of the following is the super interface of Closeable?

a) Close

b) AutoClose

c) AutoCloseable

d) Channel


Created by Nancy K.A.N.

@17:09 02-Oct-2025

Monday, September 29, 2025

Java super and this methods

 What will be the result of using super() and this() in the same method?

a) It will compile and run successfully

b) It will compile successfully, but will give a runtime error

c) It will give a compile-time error

d) Successful compilation and running will depend on the order in which super() and this() are used


Created by Nancy K.A.N.

@00:23 30-09-2025

Saturday, September 27, 2025

Java IO - Externalizable

 An Externalizable interface extends Serializable. Which of the following methods does an Externalizable interface add?

a) WriteData

b) WriteObject

c) WriteExternal

d) ReadData

e) ReadObject

f) ReadExternal


Created by Nancy K.A.N.

@00:44 28-Sept-2025

Wednesday, September 24, 2025

Java IO - Serializable

 Which of the following is not a method of a Serializable interface?

a) write()

b) serialize()

c) convertToBytes()

d) none (It has no methods)


Created by Nancy K.A.N.

@12:17 24-Sept-2025

Monday, September 22, 2025

Java Exceptions - 2

 Which of the following is a superclass of all exceptions and Errors in Java?

a) Exception

b) RuntimeException

c) Throwable

d) Error


Created by Nancy K.A.N.

@14:04 22-Sept-2025