Exam Java
Exam Java
3. EXCEPTION:- An exception is an event, which occurs during the execution of a program, that disrupts
the normal flow of the program's instructions.
EXECEPTION:- An exception is an abnormal condition that arises in a code sequence at run time.
4.DRAW BACKS:- Only people who are very familiar with JAVA can use JSP pretty well.
5. What is J2EE? J2EE, or Java 2 Platform, Enterprise Edition, is a set of specifications from Sun
Microsystems (now Oracle) for enterprise-level applications.
Java Server Pages (JSP) technology provides a simplified, fast way to create web pages that display
dynamicallygenerated content.
A) Checked Exceptions are those, that have to be either caught or declared to be thrown in the method
in which they are raised.
A) Unchecked Exceptions are those that are not forced by the compiler either to be caught or to be
thrown.
B) EXAMPLES:- ArithmeticException - ArrayIndexOutOf BoundsException - NullPointerException
9.DISSCUSS JSP AND ASP?
JSP:-defines the interaction between the server and the JSP page, and describes the format and syntax
of the page.
JSP;- Any web server, including Apache, Netscape, IIS, Websphere, and Weblogic
ASP;- Microsoft Windows (Accessing other platforms requires third-party ASP porting products.
JSP VS ASP
1) They both make use of simple sever-side scripting to provide access to Web server information and
functionality.
2) They both have similar styles of delimiting this scripting from a page's content.
C) ASP?
ASP uses ActiveX controls for its components
ASP technology is basically restricted to Microsoft Windows-based platforms. Offered primarily
as a feature of Microsoft IIS,
ASP technology does not work easily on a broader range of Web servers
ASP pages use Microsoft VBScript or Jscript
D) JSP?
JSP technology adheres to the “Write Once, Run Anywhere” philosophy
•JSP technology can run on any Web server and is supported by a wide variety of tools from
multiple vendors.
JSP technology uses the Java language for scripting
11. What is Servlets and its Key Features and common uses Cases?
Java Servlets are server-side components that handle requests and responses in web
applications.
12. jsp or .jspx; this signals to the web server that the JSP engine will process elements on this page.
Note : If a class has a generalized as well as specific exception handler, then the generalized exception
handler must be the last one.
21. Java finally:- block is always executed whether exception is handled or not.
22. .WHY EXECEPTION HANDLING?
When the default exception handler is provided by the Java run-time system ,.
23.JAVA EXCEPTION PROPAGATION;-An exception is first thrown from the top of the stack and if it is not
caught, it drops down the call stack to the previous method.
PREPARED BY OSAMA HASSAN ALI