Latest Answer: Hi,Destroy method is a method where we can provide the actions (to free up the resources)Â to be performed while the servlet is getting unloaded. In general when a servlet is getting destroyed the servlet container calls this method and also does many ...
Is there other way to prevent next thread to access the resource with out using "synchronized" blocks?
Latest Answer: According to the Java Specification, the four methods related to threading is defined in the Object class rather than the Thread Class, because of the Java Concurrency and Synchronised construct. As we start the JDK, there are different therad runs ...
Latest Answer: Class loaders are one of the cornerstones of the Java virtual machine (JVM) architecture. They enable the JVM to load classes without knowing anything about the underlying file system semantics, and they allow applications to dynamically load Java classes ...
Latest Answer: ) Abstract class defines few or none of the methods, but interface defines all the methods..2) Abstract classes should have subclasses else that will be useless..Interfaces must have implementations by other classes else that will be useless3)only an ...
Latest Answer: Very easy, just define a class that implement the Printable interface and then import that class and use the print() method.public class myPrintable implement Printable {public int print(Graphics gr, PageFormat pf, int pageIndex) throws Exception { ...
Latest Answer: It is one of the service provided by EJB Container. It is pool of instances, which is ready to use. Instance pooling reduces the number of component instances, and therefore resources, needed to service client requests. In addition, it is less expensive ...
Latest Answer: String are made immutable because 1. better memory management.Generally thousands of string literals objects are created in any of the application.To avoid the individual memory allocation to all the string objects ,JVM creates the string literal objects ...
Latest Answer: no primitive methods in javaactully java have eight primitive variables boolean,byte,char,int,float,short,long,double, ...
Latest Answer: Thread Indepandent : There is no thread involve in executing program. Each time we execute program it create a seperate process.Garbage Indepandent : ...
View page << Previous 1 2 [3] 4 Next >>

Go Top