Tag: programming languages

Questions Related to programming languages

The small group of Sun engineers called ______ were the originators of Java.

  1. Sun group

  2. Green Team

  3. Oak Team

  4. Green group


Correct Option: B

First broswer to incorporate Java technology is

  1. Internet explorer

  2. Safari

  3. Firefox

  4. Netscape navigator


Correct Option: D

'javac' is the loader for Java applications

  1. True

  2. False


Correct Option: B
  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


Correct Option: B

'java' command converts source code into Java bytecode

  1. True

  2. False


Correct Option: B

JVM is an instance of JRE (Java runtime environment)

  1. True

  2. False


Correct Option: A

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


Correct Option: A,B

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


Correct Option: A,B,C,D

AI Explanation

To answer this question, let's go through each option:

Option A) Compiler error complaining about the catch block where no IOException object can ever be thrown. This option is incorrect. The catch block doesn't specify any specific exception type, so it can catch any type of exception or throwable object.

Option B) Compiler error - IOException not found. It must be imported in the first line of the code. This option is incorrect. The code doesn't throw any IOException, so there is no need to import it.

Option C) No compiler error. The lines “Before Try” and “At the end” are printed on the screen. This option is correct. Since there are no statements inside the try block, the code will execute the statements after the try-catch block. Therefore, the output will be "Before Try" followed by "At the End".

Option D) None of the Above This option is incorrect since option C is correct.

The correct answer is C. No compiler error. The lines “Before Try” and “At the end” are printed on the screen because there are no statements inside the try block.

The class java.lang.Exception

  1. Is public

  2. Extends Throwable

  3. Implements Throwable

  4. Is serializable


Correct Option: A