0
Alien head

programming languages Online Quiz - 95

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

what are the types of methods for object class

  1. wait(), toString() only

  2. notify(), notifyall() only

  3. run(), stop()

  4. wait(),toString(),notify(), notifyall() and finalize()


Correct Option: D

what are the types of methods for object class

  1. wait(), toString() only

  2. notify(), notifyall() only

  3. run(), stop()

  4. wait(),toString(),notify(), notifyall() and finalize()


Correct Option: D

main() method is declared as a static method so that it can be invoked without having to create an instance of the corresponding class.

  1. True

  2. False


Correct Option: A

java doesnt supports global variables

  1. True

  2. False


Correct Option: A

Is it possible to extend the java.lang.String class?

  1. yes

  2. no java.lang.String is declared as final

  3. some times only

  4. none of these


Correct Option: B

java doesnot support pass by referrence only pass by value

  1. True

  2. False


Correct Option: B

which class is first called for all java class

  1. public void class

  2. object class

  3. inner class

  4. outer class


Correct Option: B

what is difference between static block and static method

  1. same thing no difference

  2. static block for particular object lock and static method locks all the object

  3. java doesnt have static block only static method it have

  4. none of these


Correct Option: B

which is not true for WCF

  1. It supports loosly coupled architecture

  2. It can work across various protocols

  3. We cannot have more than one endpoint in WCF Service

  4. It provides Security and Scalability


Correct Option: C

Which is not true for Msbuild

  1. MSbuild is used to build .Net Solutions

  2. MSBuild cannot build .Net1.1 Solutions

  3. MSBuild can work together with NAnt

  4. All are correct


Correct Option: D

Which is not true for NAnt

  1. It is used to build .Net Solutions

  2. Its Name is derived from "Not Ant"

  3. Its used to build Java Project

  4. All are correct


Correct Option: C

Which tool is used to build .net 1.1 solutions from command line

  1. MSBuild

  2. NAnt

  3. Ant

  4. Not Possible to build solutions from command line


Correct Option: B

Hibernate is usually introduced in

  1. ASP.NET

  2. JAVA

  3. Visual C++

  4. COBOL


Correct Option: B

Which Feature is introduced in .net 3.5

  1. WCF

  2. WWF

  3. LINQ

  4. WPF


Correct Option: C

10) Does a class inherit the constructors of its superclass?

  1. Using interface

  2. Class should be declared as private

  3. yes

  4. A class does not inherit constructors from any of its superclasses.


Correct Option: D

9) Abstract class can be initiated directly ?

  1. yes

  2. No

  3. sometimes only

  4. none of these


Correct Option: B

8) How will you remove duplicate element from a List?

  1. Add the List elements to Set

  2. List doesnt allow that

  3. using remove()

  4. none of these


Correct Option: A

7) How will you declare a timer variable that will be accessed by multiple threads very frequently?

  1. Declare the variable as volatile.

  2. not possible

  3. By java.util.*;

  4. By final keyword


Correct Option: A

6) Select all the incorrect options:

  1. Since enums are comparable to traditional classes, they may not be arguments in switch statements.

  2. Enums may not extend another class/ enum.

  3. Enums inherit the java.lang.Object class.

  4. Enums may be extended by another Enum.


Correct Option: A,D

5) Assume that in the current directory test.txt file is already exist. What will happen when you execute the following code? import java.io.*; class Test { public static void main(String args[]) { try { File file = new File("test.txt"); file.createNewFile(); } catch (IOException ex) { ex.printStackTrace(); } } }

  1. text.txt will be created and overwrite the old file

  2. file will not be created

  3. exception will be thrown

  4. none of the above


Correct Option: C
+ View questions