Java and .NET Programming Fundamentals

Test your knowledge of Java programming (compilation, JVM, exceptions, threading) and .NET concepts (WCF, web services, Visual Studio). Covers core language features and development tools for both platforms.

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

First broswer to incorporate Java technology is

  1. Internet explorer
  2. Safari
  3. Firefox
  4. Netscape navigator
Question 2 True/False

'javac' is the loader for Java applications

  1. True
  2. False
Question 3 Multiple Choice (Single Answer)

Which one of the following is true

  1. The JDK and SDK holds the same features with different name
  2. The JDK forms an extended subset of a SDK
  3. The SDK forms an extended subset of a JDK
  4. None
Question 4 True/False

'java' command converts source code into Java bytecode

  1. True
  2. False
Question 5 True/False

'javadoc' component is part of JDK from Sun microsystems

  1. True
  2. False
Question 6 True/False

JVM is an instance of JRE (Java runtime environment)

  1. True
  2. False
Question 7 Multiple Choice (Multiple Answers)

what is Manifest file?

  1. the meta data file that contains name-value pairs organized in different sections
  2. specific file contained within a JAR archive
  3. the manifest file is named MANIFST.MFT
  4. All the above
Question 8 Multiple Choice (Multiple Answers)

public class AQuestion{ public static void main(String args[]){ System.out.println("Before Try"); try{ } catch(Throwable t){ System.out.println("Inside Catch"); } System.out.println("At the End"); } }

  1. Compiler error complaining about the catch block where no IOException object can ever be thrown.
  2. Compiler error - IOException not found. It must be imported in the first line of the code.
  3. No compiler error. The lines “Before Try” and “At the end” are printed on the screen.
  4. None of Above
Question 9 Multiple Choice (Multiple Answers)

The class java.lang.Exception

  1. Is public
  2. Extends Throwable
  3. Implements Throwable
  4. Is serializable
Question 10 Multiple Choice (Single Answer)

Which of the following visual studio 2008 features are deployment enhancements?

  1. Clickonce deployment
  2. User access control(UAC) support
  3. Improved performance
  4. all of the above
  5. none of the above
Question 11 True/False

ASMX and WSE do not provide efficient ways for providing security,routing,reliable messaging and transaction handling.

  1. True
  2. False
Question 12 Multiple Choice (Multiple Answers)

The default bindings that WCF uses to automatically configure a service are...

  1. BasicHttpBinding
  2. WSHttpBinding
  3. MSHttpBinding
  4. NetMsmqBinding
Question 13 True/False

ASMX and WSE technologies do not provide interoperable model.

  1. True
  2. False
Question 14 Multiple Choice (Single Answer)

If CHECK statement is outside the loop structure and if the condition fails?

  1. Subsequent statements in the current processing blocks are executed
  2. There is an error message
  3. Program gets terminated
  4. Subsequent statements in the current processing blocks are not executed
Question 15 Multiple Choice (Single Answer)

Which of the following, if inserted at the comment //Here will allow the code to compile and run without error class MyCast{} public class Base extends MyCast{ static boolean b1=false; static int i = 1; static double d = 10.1; public static void main(String argv[]){ MyCast m = new MyCast (); Base b = new Base(); //………..Here }}

  1. b=m;
  2. m=b;
  3. d =i;
  4. b1 =i;
Question 16 Multiple Choice (Single Answer)

Which of the following lines will compile without error? String s = "Hello"; long l = 99; double d = 1.11; int i = 1; int j = 0;

  1. j= i<<s;
  2. j= i<<j;
  3. j=i<<d;
  4. j=i<<l;
Question 17 Multiple Choice (Single Answer)

if("String".toString() == "String") System.out.println("Equal");else System.out.println("Not Equal");

  1. Code will give compile time error
  2. Code will give runtime error
  3. Code will print "Equal"
  4. Code will print "Not Equal" ==
Question 18 Multiple Choice (Single Answer)

Contents in AQuestion.java private class AQuestion { public void method(Object o){ System.out.println("Object Verion"); } public void method(String s){ System.out.println("String Version"); } public static void main(String args[]){ AQuestion question = new AQuestion(); question.method(null); } }

  1. The code does not compile.
  2. The code compiles cleanly and shows “Object Version”.
  3. The code compiles cleanly and shows “String Version”
  4. The code throws an Exception at Runtime.
Question 19 Multiple Choice (Single Answer)

Can threads be killed manually

  1. Yes
  2. No
  3. Dont know
  4. May Be
Question 20 Multiple Choice (Single Answer)

if("String".toString() == "String") System.out.println("Equal"); else System.out.println("Not Equal");

  1. Code will give compile time error
  2. Code will give runtime error
  3. Code will print "Equal"
  4. Code will print "Not Equal"