Java Programming MCQs SET-4

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:



  • Encapsulation


  • Polymorphism


  • Abstraction


  • Inheritance

Q.62 Which statement is true regarding an object:



  • An object is of a class


  • An object is an instance of a class


  • An object is a variable


  • An object is not an instance of class

Q.63 An object-oriented programming composition relates to:



  • The use of consistent coding convection


  • It refers to coherent, common, behavior


  • It refers to procedural behavior


  • None of these

Q.64 In object-oriented programming, new classes can be defined by extending existing classes through:



  • Encapsulation


  • Interface


  • Composition


  • Inheritance

Q.65 Given a class name Book, which one of these is a valid constructor declaration for the class:



  • Book (Book b) {}


  • Book Book ()


  • Final Book ()


  • Abstract Book ()

Q.66 The wrapping of data and functions into a single unit is called:



  • Encapsulation


  • Abstraction


  • Data hiding


  • Polymorphism

Q.67 Polymorphism is a characteristic of:



  • JAVA language


  • C language


  • Cobol language


  • None of the above

Q.68 The numerical range of a char data type in Java is:



  • -128 to 127


  • 0 to 256


  • 0 to 32767


  • 0 to 65535

Q.69 Which of the following events will cause a thread to die?



  • The method sleep() is called


  • The method wait() is called


  • The execution of start() is called


  • Execution of run() method is completed

Q.70 Which of the following is true regarding the finalize() method?



  • It must only be declared with protected accessibility


  • Finalize() method can be overloaded


  • Finalize() method cannot be overloaded


  • All of the above are true

Q.71 Which of the following is a valid method declaration in Java:



  • void method 2


  • int 1 method 1


  • int method 3 () void


  • void method ()

Q.72 The concept of multiple interface implementations is achieved in Java by:



  • Extending two or more classes


  • Extending one class and implementing interfaces


  • Implementing inheritance


  • Implementing thread

Q.73 The File class is included in which package?



  • java.io


  • java.lang


  • java.awt


  • java.util

Q.74 What is the sequence of major events in the life cycle of an applet:



  • init, start, stop, destroy


  • start, init, stop, destroy


  • init, start, destroy


  • init, destroy, stop

Q.75 Threading provides execution of:



  • Only one module of the program at a time


  • Only two modules of the program at a time


  • All related program sub-blocks simultaneously


  • None of the above

Q.76 Which of these operators is used to allocate memory to an array variable in Java?



  • Malloc


  • Alloc


  • New


  • New malloc

Q.77 Which one of the following class definitions is valid and cannot be extended?



  • Final class link {}


  • Static class link {}


  • Abstract class link {}


  • Class link {}

Q.78 Which statement is true about the accessibility of members?



  • Private members are always accessible in the same package


  • Private members are accessible in the class


  • Private members are accessible outside the class


  • None of these

Q.80 The field in an interface is implicitly specified as:



  • Static only


  • Protected


  • Private


  • Both static and final

Scroll to Top