0

programming languages Online Quiz - 280

Description: programming languages Online Quiz - 280
Number of Questions: 20
Created by:
Tags: programming languages
Attempted 0/20 Correct 0 Score 0

Choose the components of Java Platform

  1. JVM

  2. JDK

  3. Java API

  4. JRE


Correct Option: A,C

What data type should be used for storing precise values ?

  1. float

  2. Float

  3. Double

  4. BigDecimal


Correct Option: D

arraycopy is to copy one array into another.

  1. True

  2. False


Correct Option: A
  1. Nested class is a way of logically grouping classes that are only used in one place.

  2. A static nested class can refer directly to instance variables or methods defined in its enclosing class.

  3. Nested classes can lead to more readable and maintainable code.

  4. A static nested class interacts with the instance members of its outer class.


Correct Option: A,C,D

java.lang.String class is declared as a final class.

  1. True

  2. False


Correct Option: A

Java packages are to be hierarchical.

  1. True

  2. False


Correct Option: B

Choose the one which is not a branching statement in Java.

  1. return

  2. break

  3. goto

  4. continue


Correct Option: C
  1. Python is faster than C

  2. Python is faster than C++

  3. Python is slower than C

  4. None of the above


Correct Option: C

Consider the following code snippet: class A: a = 1 def foo(self): print "Hello",self.a class B(A): a = 3 def foo(self): print "Hi",self.a A = B a = A() b = B() What is the value of a.foo()

  1. Error

  2. Hello 1

  3. Hi 3

  4. Hello 3


Correct Option: C

What will be the output? class A: def foo(self): print "Test" a = A() a.foo()

  1. Test

  2. Syntax error

  3. Value error

  4. Attribute error


Correct Option: D
  1. /WEB-INF

  2. /appserverInstallDirectory/webapps/webappName/WEB-INF/xml

  3. /appserverInstallDirectory/webapps/webappName/WEB-INF

  4. /appserverInstallDirectory/webapps/webappName/WEB-INF/classes


Correct Option: A,C
  1. The only way to access resources under the /WEB-INF directory is through appropriate servlet mapping directives in the deployment descriptor

  2. Server-side code has access to all resources in the web application

  3. Clients of web applications can't directly access resources in /WEB-INF/tld.

  4. A good place to keep a .tld (tag library file) is directly in the /WEB-INF directory.


Correct Option: B,C,D

Which of the following are true statements about the deployment descriptor for a web application?

  1. At least one element must be present.

  2. is a child element of .

  3. is the root element

  4. elements must all be declared before elements.

  5. At least one element must be present.


Correct Option: B,E
- Hide questions