Gaj Quiz For Aptech

58 Questions | Total Attempts: 581

SettingsSettingsSettings
Please wait...
Software Quizzes & Trivia

If you like answering specifically designed questions about GAJ quiz for Aptech try out this quiz. It is quite simple and straightforward therefore it will be easy to answer.


Questions and Answers
  • 1. 
    Annotations are comments, notes, explainations, or external remarks attached to a web document.
    • A. 

      True

    • B. 

      False

  • 2. 
    An Annotation declaration consits of ...........followed by th anotation type.1 choice.
    • A. 

      Data Type

    • B. 

      Character

    • C. 

      @

    • D. 

      @@

  • 3. 
    Annotations consist of names and have no value associated with it. It consist of the annotaion name and no additional data.
    • A. 

      Single - Value Annotations.

    • B. 

      Maker Annotations.

    • C. 

      Full Annotations.

  • 4. 
    Be Known as single - element, It consists of single value. It can be represented as data= value pair or value within the parenthese.
    • A. 

      Full Annotations.

    • B. 

      Maker Annotations.

    • C. 

      Single - Value Annotations.

  • 5. 
    This Annotation should not be used on classes, interfaces, package, or constructors. It should be used on method.
    • A. 

      @Deprecated

    • B. 

      @Documented.

    • C. 

      @suppressWarnings

    • D. 

      @Override

    • E. 

      @Interface

  • 6. 
    Which statements are true?- 3 choices
    • A. 

      Parameters in annotation can be initialized with arrays of values

    • B. 

      Parameters in annotation can have null values

    • C. 

      Parameters in annotation are declared as a fields in a class.

    • D. 

      Parameters in annotation types may defne default values for some members.

    • E. 

      Parameters in annotation can be initialized to arrays of String values

  • 7. 
    Which statements are true?- 3 choices
    • A. 

      Reflection API induces code into a particular set of classes during execution.

    • B. 

      Reflection API retrieves the object and its interface for examination.

    • C. 

      Reflection API cannot manipulate classes.

    • D. 

      Reflection API is used to get and set values in an array.

    • E. 

      Reflection API cannot be used to retrieve th constructors, methods and fields in a class.

  • 8. 
    Which of the following details are not retrieved when a class is examined?
    • A. 

      Class name

    • B. 

      Constructors

    • C. 

      Class Field

    • D. 

      Package Information

    • E. 

      Method Information.

  • 9. 
    Create objects using default constructors?
    • A. 

      NewInstance() on class

    • B. 

      NewInstance() on Constructor

    • C. 

      GetField() on class

    • D. 

      Set()

    • E. 

      Invoke()

  • 10. 
    Create objects using prameterized constructors
    • A. 

      Invoke()

    • B. 

      GetField() on class

    • C. 

      Set()

    • D. 

      NewInstance() on Constructor

    • E. 

      NewInstance() on class

  • 11. 
    Retrieve field values using reflection.
    • A. 

      NewInstance() on Constructor

    • B. 

      Invoke()

    • C. 

      GetField() on class

    • D. 

      Set()

    • E. 

      NewInstance() on class

  • 12. 
    Assign field values using reflection.
    • A. 

      NewInstance() on Constructor

    • B. 

      GetField() on class

    • C. 

      Invoke()

    • D. 

      Set()

    • E. 

      NewInstance() on class

  • 13. 
    Invoke methods using refleftion.
    • A. 

      GetField() on class

    • B. 

      NewInstance() on Constructor

    • C. 

      Invoke()

    • D. 

      Set()

    • E. 

      NewInstance() on class

  • 14. 
    Which statements are true ?- 3 choices
    • A. 

      Array can be identified at runtime.

    • B. 

      Arrays can not be created at runtime.

    • C. 

      Values of arrays can be retrieved during runtime

    • D. 

      Values to elements can be assigned to arrays at runtime.

    • E. 

      Array objects cannot be instantiated.

  • 15. 
    This is matched with a character sequence string. This is called as input Sequence.
    • A. 

      Pattern Class

    • B. 

      Matcher Class

  • 16. 
    Matcher Class does not have any constructors.
    • A. 

      True

    • B. 

      False

  • 17. 
    Tries to match the input sequence against the pattern starting from beginning.
    • A. 

      Boolean find()

    • B. 

      Boolean lookingAt()

  • 18. 
    Returns the start index of the previous match.
    • A. 

      Int start()

    • B. 

      Int end()

  • 19. 
    Returns the start index of the last match plus one.
    • A. 

      Int end()

    • B. 

      Int start()

  • 20. 
    Which statement are true?- 3 choices.
    • A. 

      A regular exp consist of symbols and syntacic elements

    • B. 

      Pattern and Matcher class are the classes used to perform text processing

    • C. 

      The java.util.regex package consist of two classes

    • D. 

      Find and replace are some of the operations that can be performed by regex

    • E. 

      The regex package uses boolean matching

  • 21. 
    The basic form of pattern matching supported by regex- 1 choice.
    • A. 

      String Literal

    • B. 

      boolean

    • C. 

      Character-base

  • 22. 
    Which are Metacharacters?- 3 choices
    • A. 

      #

    • B. 

      { }

    • C. 

      [ ]

    • D. 

      @

    • E. 

      *

  • 23. 
    Which are not metacharacter?- 2  choices
    • A. 

      ?

    • B. 

      & &&

    • C. 

      . $

    • D. 

      ^ + -

    • E. 

      ! ,

  • 24. 
    This is a technique where all characters are matched except those listed. can be represented by inserting the metacharacter "^" at the beginning of character class. - 1 choice
    • A. 

      Simple Classes

    • B. 

      Negation

    • C. 

      Ranges

  • 25. 
    The UNION  is
    • A. 

      A single character class comprising of two or more separate character classes

    • B. 

      A single character class which matches to characters that are common to all its nested class