programming languages Online Quiz - 185
Description: programming languages Online Quiz - 185 | |
Number of Questions: 20 | |
Created by: Aliensbrain Bot | |
Tags: programming languages |
Within a web.xml which maps the servlet com.tcs.login.LoginServlet to the url /utils/LoginServlet
Which element guarantees a servlet will be loaded on the start up of the web application
How to define a session time out of 10 minutes in web.xml
Which is the correct definition of servlet init parameter in web.xml?
package polymorphism;class TestPolymorphismSuper1 { String name; TestPolymorphism2 testPoly() { TestPolymorphism2 TS = new TestPolymorphism2(); TS.name ="tcs"; return TS; }}public class TestPolymorphism2 extends TestPolymorphismSuper1{ TestPolymorphism2 testPoly() { TestPolymorphism2 TSub = new TestPolymorphism2(); TSub.name = "UX"; return TSub; } public static void main(String[] args) { TestPolymorphismSuper1 TSuper = new TestPolymorphism2(); TSuper.testPoly(); System.out.println(TSuper.name); }}
package polymorphism;class TestSup { static int p = 100;}public class TestPoly extends TestSup { public static void main(String[] args) { TestPoly TP = new TestPoly(); TP.p = 400; TestSup TS = new TestSup(); TS.p = 100; TestSup TSP = new TestPoly(); TSP.p = 500; System.out.print("TestSup = " + TestSup.p); System.out.print(" ,TestPoly = " + TestPoly.p); System.out.print(" ,TP = " + TP.p); System.out.print(" ,TS = " + TS.p); System.out.print(" ,TSP = " + TSP.p); }}
package polymorphism; class TestSupe { static int p = 100; } public class TestPoly1 extends TestSupe { static int p =1000; public static void main(String[] args) { TestPoly1 TP = new TestPoly1(); TP.p = 400; TestSupe TS = new TestSupe(); TS.p = 300; TestSupe TSP = new TestPoly1(); TSP.p = 500; System.out.print("TestSupe = " + TestSupe.p); System.out.print(" ,TestPoly = " + TestPoly1.p); System.out.print(" ,TP = " + TP.p); System.out.print(" ,TS = " + TS.p); System.out.print(" ,TSP = " + TSP.p); } }
What is a method's signature?
What is an advantage of polymorphism?
Which is not a java keyword?
What command is used to compile a program in Java
How many objects of a given class can there be in a program?
Is it OK if a class definition implements two interfaces, each of which has the same definition for a constant PI?
The garbage collector will run immediately when the system runs out of memory.
Current version of java is 1.5
What is dependency injection?