21 Jul 2014

Smu mba java and web design sample paper set five



tion, automatically
4. Which of the following statement is False?
The JDK contains everything that is in the JRE, in addition to tools such as the compilers and debuggers required for developing applets and applications.
To gain access to all of the functionality of the latest version of the Java platform, you must install the most recent JDK available in the market.
Correct
The development of the Java applications does not depend on the variables.
Feedback:Right choice: You will be able to develop Java applications only if the environment variables are set properly.
While you are installing the JDK, you must refer the documentation in case you come across any issues.
Unit 13-4 Mark

1. Match the following:
Match
Correct Answer
User answer
Feedback
Java run-time system
These relate to the fundamental errors that violate the rules of the Java programming language.
This class defines exceptions that are not expected to be caught under normal circumstances by your program.
incorrect
Code generated
These are used to report some error condition to the caller of a method.
These relate to the fundamental errors that violate the rules of the Java programming language.
incorrect
Exception
This class specifies the exceptional conditions that your programs should catch.
This class specifies the exceptional conditions that your programs should catch.
correct
Error
This class defines exceptions that are not expected to be caught under normal circumstances by your program.
These are used to report some error condition to the caller of a method.
incorrect
2. Consider that you are working in ED technologies as a software engineer. You are involved in writing a java program. You have a code for opening a file, entering data and closing the file. You need to execute a part of the code at any cost that is closing the file. You are not able to close the file because of the exception that has occurred in opening the file. Now, you should have a exception handling mechanism to close the file. Which of the following mechanism is used to address the scenario?
Should have chosen
Finally
Wrong
Try
Feedback:Not the right choice: The program statements that you want to monitor for exceptions are specified within the try block but it is not used to execute the statement at any cost so this is not suitable to address the scenario.
Catch
Throws
3. State whether the following statements are True or False. 1. Swing is a set of classes that provide more powerful and flexible GUI components. 2. The main advantage of AWT is that it translates its various visual components into their corresponding platform-specific equivalents, or peers. 3. The AWT describes the fundamental set of controls, dialog boxes, and windows that support a usable graphical interface. 4. Swing components are written in Java and do not map directly to platform-specific peers.
Wrong
1T, 2T, 3T, 4T
Feedback:Not the right choice: Statement 1 is true since swing is a set of classes that provide more powerful and flexible GUI components. Statement 2 is false since a drawback of AWT is that it translates its various visual components into their corresponding platform-specific equivalents, or peers. Statement 3 is true since the AWT describes the fundamental set of controls, dialog boxes, and windows that support a usable graphical interface. Statement 4 is true since swing components are written in Java and do not map directly to platform-specific peers.
Should have chosen
1T, 2F, 3T, 4T
1T, 2T, 3F, 4T
1T, 2T, 3T, 4F
Unit 13-2 Mark

1. State whether the following statements are true or false. 1. API is a set of data structures, routines, protocols, and tools to build a software application. 2. Package is not a mechanism by which class name space can be partitioned into more manageable chunks and it is not a naming and visibility control mechanism.
1F, 2T
Correct
1T, 2F
Feedback:Right choice: Statement 1 is true since API is a set of data structures, routines, protocols, and tools to build a software application. Statement 2 is false since package is a mechanism by which class name space can be partitioned into more manageable chunks and it is a naming and visibility control mechanism.
1T, 2T
1F, 2F
2. State whether the following statements are True or False. 1. In Java, multiple threads coexist in the same memory space but share different instance variables. 2. When a Java program starts up, the main thread automatically begins running.
1F, 2F
Should have chosen
1F, 2T
Wrong
1T, 2T
Feedback:Not the right choice: Statement 1 is false since the in Java, multiple threads coexist in the same memory space and share the same instance variables. Statement 2 is true since when a Java program starts up, the main thread automatically begins running.
1T, 2F
3. The_________ subclass of exception contains the exceptions that are __________ defined for programs and includes exceptions such as divide by zero and invalid array indexing.
Wrong
Linkage error, automatically
Feedback:Not the right choice: The RuntimeException subclass of exception contains the exceptions that are automatically defined for programs and includes exceptions such as divide by zero and invalid array indexing and linkage error is the subclass of error but not the exception.
Linkage error, globally
RuntimeException, globally
Should have chosen
RuntimeExcep

No comments:

Post a Comment