In interfaces the methods just defined without implementation then what is the purpose of defining the methods?
Latest Answer : Even though we call a jsp page from servlet through request dispatcher,we can not call a perticular method of a jsp from servlet.there is no such mechanism in servlet API.but iam not sure. ...
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 : ) 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 : 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 : 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 ...
Is there other way to prevent next thread to access the resource with out using "synchronized" blocks?
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 ...
Servlet is Java class. Then why there is no constructor in Servlet? Can we write the constructor in Servlet
Latest Answer : it is used to load the class at runtime and in jdbc it is used to load the driver and according to specification every driver class must contain a static block in which it contains the code to instanciate itself and the register itself with the driver ...