81 Q What is garbage collection?
A Garbage collection is the process of releasing memory used by unreferenced objects. It relieves the programmer from the process of manually releasing the memory used by objects .
82 Q What is the disadvantage of garbage collection?
A It adds an overhead that can affect performance. Additionally there is no guarantee that the object will be garbage collected.
83 Q What is a Dictionary?
A Dictionary is a parent class for any class that maps keys to values., In a dictionary every key is associated with at most one value.
84 Q What is JAR file ?
A JAR stands for Java Archive. This is a file format that enables you to bundle multiple files into a single archive file. A jar file will contains a manifest.mf file inside META-INF folder that describes the version and other features of jar file.
85 Q Why Java is not fully objective oriented ?
A Due to the use of primitives in java, which are not objects.
86 Q What is a marker interface ?
A An interface that contains no methods. Eg: Serializable, Cloneable, SingleThreadModel etc. It is used to just mark java classes that support certain capability.
87 Q What are tag interfaces?
A Tag interface is an alternate name for marker interface.
88 Q What are the restrictions placed on static method ?
A We cannot override static methods. We cannot access any object variables inside static method. Also the this reference also not available in static methods.
89 Q What is JVM?
A JVM stands for Java Virtual Machine. It is the run time for java programs. All are java programs are running inside this JVM only. It converts java byte code to OS specific commands. In addition to governing the execution of an application's byte codes, the virtual machine handles related tasks such as managing the system's memory, providing security against malicious code, and managing multiple threads of program execution.
90 Q What is JIT?
A JIT stands for Just In Time compiler. It compiles java byte code to native code.
91 Q What is java byte code?
A Byte code is an sort of intermediate code. The byte code is processed by virtual machine.
92 Q What is method overloading?
A Method overloading is the process of creating a new method with the same name and different signature.
93 Q What is method overriding?
A Method overriding is the process of giving a new definition for an existing method in its child class.
94 Q What is finalize() ?
A Finalize is a protected method in java. When the garbage collector is executes , it will first call finalize( ), and on the next garbage-collection it reclaim the objects memory. So finalize( ), gives you the chance to perform some cleanup operation at the time of garbage collection.
95 Q What is multi-threading?
A Multi-threading is the scenario where more than one threads are running.
96 Q What is deadlock?
A Deadlock is a situation when two threads are waiting on each other to release a resource. Each thread waiting for a resource which is held by the other waiting thread.
97 Q What is the difference between Iterator and Enumeration?
A Iterator differ from enumeration in two ways Iterator allow the caller to remove elements from the underlying collection during the iteration with well-defined semantics. And , method names have been improved.
98 Q What is the Locale class?
A A Locale object represents a specific geographical, political, or cultural region
99 Q What is internationalization?
A Internationalization is the process of designing an application so that it can be adapted to various languages and regions without changes.
100 Q What is anonymous class ?
A An anonymous class is a type of inner class that don't have any name.
No comments:
Post a Comment