programming languages Online Quiz - 177
Description: programming languages Online Quiz - 177 | |
Number of Questions: 20 | |
Created by: Aliensbrain Bot | |
Tags: programming languages |
package loop; public class TestLoop2 { public static void main(String[] args) { int p = 100; do { while(p>100) { System.out.println("I am in while"); } System.out.println("I am in do-while"); } while (p > 100); } }
package loop; public class TestLoop3 { public static void main(String[] args) { int p = 0; for (int i = 0; i < 3; i++) { p = i+1; if (p == 2) { continue; } System.out.println("i in loop = " + i); } } }
package loop; public class TestLoop4 { public static void main(String[] args) { for(int i=1,j=1; i<2,j<2;i++,j++) { System.out.println("i= "+i+" j = "+j); } } }
package loop; public class TestLoop6 { void testFor() { for (int i = 1; i < 10; i++) { System.out.println("i in for loop = " + i); if (i == 1) { return; } } System.out.println("For loop over"); } public static void main(String[] args) { TestLoop6 tl = new TestLoop6(); tl.testFor(); System.out.println("Method call over"); } }
package loop; public class TestLoop1 { void testFor() { for (int i = 1; i < 3; i++) { System.out.println("i in for loop = " + i); if (i == 1) { break; } } System.out.println("For loop over"); } public static void main(String[] args) { TestLoop1 tl = new TestLoop1(); tl.testFor(); System.out.println("Method call Over"); } }
package overriding; class Super2 { void testSuper(int empId) { System.out.println("I am in Super " + empId); } } public class TestOverrideSub2 extends Super2 { public void testSuper(int empId) { System.out.println("I am in Sub " + empId); } public static void main(String[] args) { Super2 s2 = new TestOverrideSub2(); s2.testSuper(144670); } }
package overriding; class Super5 { int testAdd(int x,int y) { System.out.println("Super Add "+(x+y)); return(x+y); } } public class TestOverrideSub5 extends Super5{ long testAdd(int x,int y) { System.out.println("Sub Add "+(x+y)); return(x+y); } public static void main(String[] args) { Super5 s5 = new TestOverrideSub5(); s5.testAdd(5,5); } }
The __________ attribute is used to declare variables based on definitions of columns in table.
Which of the HTTP methods below is not considered to be "idempotent"? (Choose one.)
Which of the HTTP methods below are likely to change state on the web server? (Choose three.)
What is the maximum number of parameter values that can be forwarded to the servlet from the following HTML form? (Choose one.)
Chapter 1 Question 9
Java C# C C++ Pascal AdaWhich of the following servlet methods can return null? (Choose one.)
Identify correct statements about the META-INF directory from the list below. (Choose three.)
What is the result of loading the web-app with the following deployment descriptor and attempting to execute the following servlet? (Choose two.) author Elmore Leonard public class ContextInitParms extends HttpServlet { protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { response.setContentType("text/html"); PrintWriter out = response.getWriter(); Out.write(""); ServletContext sc = getServletContext(); out.write(sc.getInitParameter("auther")); out.close(); } }
Given the following deployment descriptor, identify the sequence of filters that execute on a direct client request for ServletA. (Choose one.) LogFilter ServletA AuditFilter /ServletA FORWARD EncryptionFilter /* ServletA /ServletA