0

web technology Online Quiz - 205

Description: web technology Online Quiz - 205
Number of Questions: 20
Created by:
Tags: web technology
Attempted 0/20 Correct 0 Score 0

Which of the following is used by assemblies to find each other?

  1. Searching directory paths

  2. Cannot find each other by any method

  3. By pointers

  4. None of the Above


Correct Option: A

Which keyword can protect a class in a package from accessibility by the classes outside the package?

  1. private

  2. b.final

  3. c.protected

  4. d.don't use any keyword at all (make it default)


Correct Option: D

AI Explanation

To answer this question, you need to understand the access modifiers in Java.

The access modifiers in Java are used to control the visibility and accessibility of classes, methods, and variables. There are four access modifiers in Java:

  1. public: Allows access from anywhere, including outside the package.
  2. protected: Allows access from within the same package and from subclasses, even if they are in different packages.
  3. private: Limits access to within the same class only.
  4. Default (no modifier): Allows access from within the same package only.

In this question, the keyword that can protect a class in a package from accessibility by the classes outside the package is the default access modifier (no keyword at all). When a class does not have an access modifier specified, it is considered to have default access. This means that the class can be accessed only by other classes within the same package.

Option A) private: This option is incorrect because the private access modifier restricts access to within the same class, not the same package. Option B) final: This option is incorrect because the final keyword is used to prevent a class from being subclassed, but it does not restrict access from outside the package. Option C) protected: This option is incorrect because the protected access modifier allows access from subclasses and classes within the same package, but it does not restrict access from outside the package. Option D) Don't use any keyword at all (make it default): This option is correct. By not specifying any access modifier, the class will have default access and can only be accessed by other classes within the same package.

Therefore, the correct answer is option D.

Which of the following statements about abstract methods/classes in Java are true? 1. An abstract class cannot be instantiated. 2. Constructors cannot be abstract. 3. A subclass of an abstract class must defined the abstract methods. 4. Static methods may be declared abstract.

  1. Line 1, line 2 and line 3 only

  2. b.Line 1 only

  3. c.Line 1 and line 2 only

  4. d.Line 2 only


Correct Option: C
  1. Visible only inside the package.

  2. b.Visible only in the class and its subclass in the same package.

  3. c.Visible in all classes in the same package and subclasses in other packages.

  4. d.Visible only in the class where it is declared.


Correct Option: C

Which of the following are keywords? (A) switch (B) integer (C) default (D) boolean (E) object

  1. (B) & (C)

  2. b. (E)

  3. c. (A) & (C)

  4. d. (D)


Correct Option: C

Which of the following are not keywords? (A) NULL (B) implements (C) protected (D) extended (E) string

  1. (D) & (E)

  2. b. (A), (D) & (E)

  3. c. (D)

  4. d. (C), (D) & (E)


Correct Option: B

AI Explanation

To determine which options are not keywords, we need to understand what keywords are in programming.

Keywords are predefined reserved words in a programming language that have special meanings and cannot be used as variable names or identifiers. These keywords are typically used to define the syntax and structure of the programming language.

Now, let's go through each option to determine which ones are not keywords:

Option A) (D) & (E) - This option includes (D) and (E) as not keywords. (D) is "extended" and (E) is "string". "extended" is not a keyword, but "string" is a keyword in many programming languages.

Option B) (A), (D) & (E) - This option includes (A), (D), and (E) as not keywords. We have already determined that (D) is not a keyword, and (A) is "NULL" which is also not a keyword. However, (E) is "string" which is a keyword.

Option C) (D) - This option includes (D) as not a keyword, which is correct.

Option D) (C), (D) & (E) - This option includes (C), (D), and (E) as not keywords. We have already determined that (D) is not a keyword. (C) is "protected" which is a keyword in many programming languages. (E) is "string" which is also a keyword.

Based on the above analysis, the correct answer is B. The options (A), (D), and (E) are not keywords.

We would like to make a member of a class visible in all subclasses regardless of what package they are in. Which one of the following keywords would achieve this?

  1. private

  2. 0

  3. c. private OR protected

  4. d. protected


Correct Option: C
  1. Edit portal registry and specify new search record

  2. User PeoplepleCode to overwrite search record

  3. Overwrite in Menu item definition

  4. Specify different search record in different permission lists


Correct Option: C
  1. file server

  2. batch server

  3. web server

  4. Query Server


Correct Option: B
  1. Set the state record to derived/work.

  2. Remove all sectionlevel and steplevel auto commits.

  3. Nothing more. The Do Select action is set to Restartable

  4. Deselect the Disable Restart check box on the Program Properties page


Correct Option: D
- Hide questions