-
Why the Java interpreter can't run directly the applet.Eventhought the Java applet is a compiled Java code?
because they are used as part of a larger applications.
-
-
-
-
What are the checked Exceptions servlet service methodcan throw?
ServletException,IOException.
-
-
-
Can a statement have a multiple labels?
yes.A statement can have multiple labels:ex:Label1: Label2: System.out.println("Mutliple labels. ");
-
-
-
-
What is the another name for native methods?
foreign methods.
-
-
If the array size is negative,what will happen?
If the array size is negative, a NegativeArraySizeException is thrown
-
-
What are the legal modifiers to local inner classes?
final or abstract but not both at the same time.
-
Whether the java uses call_by_value parameter passing strategy or call-by-reference parameter passing strategy?
The parameter passing strategy in Java is call-by-value and not call-by-reference, regardless of the type of the parameter.
-
What is the difference between actual parameters and formal parameters?
Actual parameters are parameters passed to the method when the method is invoked by a method call, and can vary from call to call. Formal parameters are parameters defined in the method definition.
-
How can we calculate the shift distance in shift operators?
The shift distance is calculated by AND-ing the value of the right-hand operand with a mask value of 0x1f (31) if the left-hand has the promoted type int, or using a mask value of 0x3f (63) if the left-hand has the promoted type long. This effectively means masking the five lower bits of the right-hand operand in the case of an int left-hand operand, and masking the six lower bits of the right-hand...
-
-
-
-
Explain the contexts in which binary numeric promotion applies?
Binary numeric promotion is applied in the following contexts:1.operands of the arithmetic operators *, /, %, +, and - 2.operands of the relational operators = 3.operands of the numerical equality operators == and != 4.operands of the integer bitwise operators &, ^, and |
-
What is binary numeric promotion states?
Binary numeric promotion implicitly applies appropriate widening primitive conversions so that a pair of operands have the broadest numeric type of the two, which is always at least int. Given T to be the broadest numeric type of the two operands, the operands are promoted as follows under binary numeric promotion.If T is broader than int, both operands are converted to T; otherwise, both operands...
-
Tell me the contexts in which the Unary numeric promotion is applied?
Unary numeric promotion is applied in the following contexts:1.operand of the unary arithmetic operators + and -2.operand of the unary integer bitwise complement operator ~ 3.during array creation; for example, new int[20], where the dimension expression (in this case 20) must evaluate to an int value 4.indexing array elements; for example, table['a'], where the index expression (in this case 'a')...
-
What is unary numeric promotion states?
Unary numeric promotion states thatIf the single operand of the operator has a type narrower than int, it is converted to int by an implicit widening primitive conversion; otherwise, it is not converted
-
-
-
-
Is garbage collection concept platform dependent/indepentdent?
platform dependent.
-
Is thread concept platform dependent or independent?
platform dependent.
-
What are the characteristics of cookies?
The following are a list of characteristics of cookies:1.Cookies are only sent back to the server that created them and not to any other server.For example,if a cookie was created by the Web server of www.macromedia.com and sent to the client or the browser,the cookie can be sent back to the same server only.2.Cookies are only used by the server to find out the computer name,IP address or any other...
-
Describe Servlet Class Hierarchy.
Class java.lang.Object
-
What are the Characteristics of Servlets?
The characteristics of servlets that have gained them a wide spread acceptance are as follows:1.Servlets are efficient:The initialization code for a servlet is executed only when the servlet is executed for the first time.Subsequently, the requests that are received by the servlet are processed by its service() method.This helps to increase the efficiency of the server by avoiding creation of unnecessary...
-
Comparison between Servlets and CGI Scitpting technologies.
A CGI scripts is a program that is written in C,C++,or Perl.A CGI script gets executed in a server.When a aserver receives a request from the client for processing data,the server passes the request to the CGI script.The CGI script processes the request and sends the output in the form of HTML to the server.The server in turn passess the request to the client.The disadvantages of using a CGI script...
-
-
-