Hey Guys welcome to CES Study247,Today I am provide you Java Programming MCQs SET-4
Q.61 The process that focuses on only important characteristics is known as:
- A) Encapsulation
- B) Polymorphism
- C) Abstraction
- D) Inheritance
Q.62 Which statement is true regarding an object:
- A) An object is of a class
- B) An object is an instance of a class
- C) An object is a variable
- D) An object is not an instance of class
Q.63 An object-oriented programming composition relates to:
- A) The use of consistent coding convection
- B) It refers to coherent, common, behavior
- C) It refers to procedural behavior
- D) None of these
Q.64 In object-oriented programming, new classes can be defined by extending existing classes through:
- A) Encapsulation
- B) Interface
- C) Composition
- D) Inheritance
Q.65 Given a class name Book, which one of these is a valid constructor declaration for the class:
- A) Book (Book b) {}
- B) Book Book ()
- C) Final Book ()
- D) Abstract Book ()
Q.66 The wrapping of data and functions into a single unit is called:
- A) Encapsulation
- B) Abstraction
- C) Data hiding
- D) Polymorphism
Q.67 Polymorphism is a characteristic of:
- A) JAVA language
- B) C language
- C) Cobol language
- D) None of the above
Q.68 The numerical range of a char data type in Java is:
- A) -128 to 127
- B) 0 to 256
- C) 0 to 32767
- D) 0 to 65535
Q.69 Which of the following events will cause a thread to die?
- A) The method sleep() is called
- B) The method wait() is called
- C) The execution of start() is called
- D) Execution of run() method is completed
Q.70 Which of the following is true regarding the finalize() method?
- A) It must only be declared with protected accessibility
- B) Finalize() method can be overloaded
- C) Finalize() method cannot be overloaded
- D) All of the above are true
Q.71 Which of the following is a valid method declaration in Java:
- A) void method 2
- B) int 1 method 1
- C) int method 3 () void
- D) void method ()
Q.72 The concept of multiple interface implementations is achieved in Java by:
- A) Extending two or more classes
- B) Extending one class and implementing interfaces
- C) Implementing inheritance
- D) Implementing thread
Q.73 The File class is included in which package?
- A) java.io
- B) java.lang
- C) java.awt
- D) java.util
Q.74 What is the sequence of major events in the life cycle of an applet:
- A) init, start, stop, destroy
- B) start, init, stop, destroy
- C) init, start, destroy
- D) init, destroy, stop
Q.75 Threading provides execution of:
- A) Only one module of the program at a time
- B) Only two modules of the program at a time
- C) All related program sub-blocks simultaneously
- D) None of the above
Q.76 Which of these operators is used to allocate memory to an array variable in Java?
- A) Malloc
- B) Alloc
- C) New
- D) New malloc
Q.77 Which one of the following class definitions is valid and cannot be extended?
- A) Final class link {}
- B) Static class link {}
- C) Abstract class link {}
- D) Class link {}
Q.78 Which statement is true about the accessibility of members?
- A) Private members are always accessible in the same package
- B) Private members are accessible in the class
- C) Private members are accessible outside the class
- D) None of these
Q.80 The field in an interface is implicitly specified as:
- A) Static only
- B) Protected
- C) Private
- D) Both static and final