Tag: programming languages

Questions Related to programming languages

  1. Code will give compile time error

  2. Code will give runtime error

  3. Code will print "Equal"

  4. Code will print "Not Equal"


Correct Option: D
  1. Dictionary

  2. Comparative

  3. HashMap

  4. Treeset


Correct Option: A
Explanation:

To answer this question, the user needs to know about the concept of inheritance in object-oriented programming and the relationship between classes.

The super class of hash table is the Dictionary class.

Option A is correct because Dictionary is the superclass of Hashtable. In Java, the Hashtable class extends the Dictionary class to inherit its methods and properties.

Option B is incorrect because there is no superclass called Comparative for Hashtable or any other Java collection class.

Option C is incorrect because HashMap is not the superclass of Hashtable. Although both classes are used for mapping keys to values, they have different implementation details and are not related by inheritance.

Option D is incorrect because Treeset is also not the superclass of Hashtable. Treeset is a class that implements the Set interface and is used to store a sorted collection of unique elements.

Therefore, the correct answer is:

The Answer is: A

Can u overload main()method?

  1. True

  2. False


Correct Option: A
  1. Extensible MarkUp Language

  2. Extra Modern Link

  3. Extensible MakeUp Language

  4. X-Markup Language


Correct Option: A
  1. Elements may have multiple atrribute with the same name

  2. Quoting attribute is optional

  3. Elements may nest but not overlap

  4. All of the above.


Correct Option: C