Some of the Interview Questions with answer on Java Technology
can be found on this site as follows:
Java Interview Question
Can I be able to override a final method?
Java Interview answer
No, final keyword is used to restrict any change in
implementation or state of any Java type.
By implementing final method, we can restrict this method
from being overridden.
Java Interview question
Which one should I use for forwarding request a servlet hosted in
another instance of web container node in cluster, sendRedirect or
requestdispatcher?
Java Interview answer
sendredirect can be used to initiate another request, but same request
cann't be forwarded to another web container instance in cluster nodes.
(Please send in your answers to my email id share.understanding at gmail .com)
J2ME >> Overview of J2ME operational environment
Here is a diagram depicting the Operational environment of any mobile
application.
Components for the same are a Mobile/PDA, a WAP Gateway, a web server,
a JAD file and a Jar file.
JAD ( Java Descriptor file) has all the information
about the location and class for any MIDLET.
Once user types in the URL of the MIDLET
(like http://www.xyz.com/x/test.jad )
request goes to the WAP server, then to the WEB server over HTTP.
This URL is added to the Java Application Manager (JAM)stored
in the Mobile device.
JAD file is downloaded onto the JAM and the send a request to WAP/WEB
server for the JAR file ( Java Archive file ).
After downloading the required JAR file, Mobile device stores it in
the local Database as depicted in the diagram.
On invocation of the Install and run, the MIDLET ( stored in the JAR
file), installs itself and start running inside the KVM of the
Mobile device.
A sample JAD file is listed below:
MIDlet-1: eShop, eShop.png, EShop
MIDlet-Jar-Size: JAR file size in bytes (such as 1002)
MIDlet-Jar-URL: http://www.xyz.com/x/eShop.jar
MIDlet-Name: eShop
MIDlet-Vendor:
MIDlet-Version: version (such as 1.0)
Here MIDlet-1 says there is only one MIDLET in the eShop.jar file located
at MIDlet-Jar-URL.
Size of the eShop.jar file is value against MIDlet-Jar-Size
Third party Advertisement
Sometimes client is accessing a WEB server directly from mobile device.
Then one HTML file is needed at the server end for mobile devices to
access and install the required MIDlet.
The HTML file can be as small as :