Posted on August 12, 2008 by sharat
Just-In-Time Compilers
The simplest tool used to increase the performance of your application is the Just-In-Time (JIT) compiler. A JIT is a code generator that converts Java bytecode into native machine code. Java programs invoked with a JIT generally run much faster than when the bytecode is executed by the interpreter. The Java Hotspot VM removes [...]
Filed under: Java | Leave a Comment »
Posted on May 16, 2007 by sharat
1. What is an Exception ? An exception is an abnormal condition that arises in a code sequence at run time. In other words, an exception is a run-time error.
2. What is a Java Exception ? A Java exception is an object that describes an exceptional condition i.e., an error condition that has occurred in [...]
Filed under: Exceptions | 5 Comments »
Posted on May 15, 2007 by sharat
1.What is meant by compatible equals() and hashCode() methods ? In order for the Java Collections to work properly (and everything else in Java), the equals() and hashCode() methods must be compatible. Here, compatible means that if equals() reports that two instances are the same, then the hashCode() of both instances must be the same [...]
Filed under: Collection | 2 Comments »
Posted on May 15, 2007 by sharat
1.How to find the maximum size of heap used in the memory in java ?maxMemory(): Returns the maximum amount of memory that the Java virtual machine will attempt to use totalMemory(): Returns the total amount of memory in the Java virtual machine. Also you can use -Xmx parameter to set the max heap size.
2.What [...]
Filed under: Collection | 1 Comment »
Posted on April 9, 2007 by sharat
1.Can a private method of a superclass be declared within a subclass?2.Why Java does not support multiple inheritence ? 3.What is the difference between final, finally and finalize?4.Where and how can you use a private constructor.5.In System.out.println(),what is System,out and println,pls explain? 6.What is meant by “Abstract Interface”? 7.Can you make an instance of an [...]
Filed under: Java | 1 Comment »
Posted on April 9, 2007 by sharat
1.What is the difference between an Interface and an Abstract class? 2.What is the purpose of garbage collection in Java, and when is it used? 3.Describe synchronization in respect to multithreading. 4.Explain different way of using thread? 5.What are pass by reference and passby value? 6.What is HashMap and Map? 7.Difference between HashMap and HashTable? [...]
Filed under: Java | 7 Comments »