Tag: java

Questions Related to java

  1. True

  2. False


Correct Option: B
Explanation:

To evaluate this statement, we need to understand the behavior of the default statement in a switch statement.

The default statement in a switch statement is optional and serves as a catch-all case. It is executed if none of the other cases match the value being switched.

Now let's go through each option:

A. True: This option is incorrect. The default statement is only executed if none of the other cases match the value being switched. If any of the other cases match, the default statement is skipped.

B. False: This option is correct. The default statement is not always executed. It is only executed if none of the other cases match the value being switched.

Therefore, the correct answer is B. False.

Let me know if you have any further questions!

  1. By marking it private

  2. By marking it volatile

  3. By marking it transient

  4. You can not.


Correct Option: C
  1. Automatic

  2. Global

  3. Static

  4. External


Correct Option: A,C,D
  1. Virtual functions

  2. Inline functions

  3. Static functions

  4. Friend functions


Correct Option: B
  1. Encapuslation

  2. Abstraction

  3. Information Hiding

  4. Polymorphism


Correct Option: B

Which of them is a not command line Tool?

  1. 1.java

  2. 2.javaw

  3. 3.javapath

  4. 4.javadoc


Correct Option: C

AI Explanation

To answer this question, you need to understand the concept of command line tools. Command line tools are programs or applications that can be executed from the command line interface of an operating system.

Let's go through each option to understand why it is correct or incorrect:

Option A) 1.java - This option is incorrect because "java" is a command line tool for running Java programs.

Option B) 2.javaw - This option is incorrect because "javaw" is also a command line tool for running Java programs, specifically Java programs that don't display a console window.

Option C) 3.javapath - This option is correct because "javapath" is not a recognized command line tool. It does not exist as a standard command for executing tasks in the command line interface.

Option D) 4.javadoc - This option is incorrect because "javadoc" is a command line tool that generates Java API documentation.

The correct answer is C) 3.javapath. This option is correct because "javapath" is not a recognized command line tool.

  1. 1.add(Object x)

  2. 2.remove(Object x)

  3. 3.contains(Object x)

  4. 4.insert(int i,Object x)

  5. 5.set(int I,Object x)


Correct Option: D