|
|
|
|
1.Difference between a process and a
thread? 2.What are checked and unchecked
exceptions? Unchecked exceptions are the ones which cannot be handled in the code. These are rather unexpected exceptions like NullPointerException, OutOfMemoryError, DivideByZeroException, typically, programming errors. Unchecked exceptions are subclasses of RunTimeExceptions. 3.Is synchronised a
modifier?indentifier??what is it?? 5.What is singleton class? where is
it used? 6.Name the null interfacess in
java?what are they? 7.How to avoid deadlock?
8.Garbage collection thread belongs to which priority..min?normal?max?The Java garbage collection is implemented as a low priority thread 9.What is meant by time slicing? 11.Is string a wrapper class? 12.how can you retrieve warning in
jdbc? 13.Is there any tool in java that can
create reports? 14.What is JTS? Where is it used? 15.Why java does not have multiple
inheritance?
The reasons for omitting multiple inheritance from the Java language mostly stem from the "simple, object oriented, and familiar" goal. As a simple language, Java's creators wanted a language that most developers could grasp without extensive training. To that end, they worked to make the language as similar to C++ as possible (familiar) without carrying over C++'s unnecessary complexity (simple). In the designers' opinion, multiple inheritance causes more problems and confusion than it solves. So they cut multiple inheritance from the language (just as they cut operator overloading). The designers' extensive C++ experience taught them that multiple inheritance just wasn't worth the headache. 16.Why java is not a 100% oops? In a 100% Object oriented language, everything is an Object. That is not the case with Java. Java uses primitive types such as int, char, double. Java primitive types ARE NOT OBJECTS. All the rest are objects. Keep in mind that int, char and other primitive types CAN NOT BE STORED in collections (e.g. Vector, Hashtable) to store these types in a collections, you need to Use wrapper classes (e.g. Integer, Double). 17.What is a resource bundle? What is meant by resource leak? Resource leakage generally referrs to memory leakage but can refer to any type of system resource that isn't managed correctly. Memory leakage refers to memory that is no longer used but is not freed and therefore is not available for the system to reuse. Java is supposed to remove most of the memory leakage issues of other languages but it is still possible to create situations that waste memory such as java.util.Map that you never remove information from. Resource leakage in a more general sence can refer to any system or external application finite resource. The java.awt.Graphics context is supposed to be like this because in java it is a wrapper on a system resource. If you don't close it, it can't be cleaned up by the system. Database resources are another example. Poor Databse code can prevent connections from being recycled by the DBMS and represent a drag on the database.
|
|
|