.
  Vyom World.com . Let's Touch the Sky Together!  
.

Home
VyomWorld.com Home
Interview Questions
VyomLinks.com Home
JobsAssist.com Home
Vyom Network
Contact Us
Jobs & Careers
Resume Submitter
Placement Papers
IT Companies Directory
Computer Jobs
Interview Questions
Online Exams
Vyom Career eMag.
Fun
Send FREE SMS!
SMS Jokes
Source Codes Library
Source Codes Home
ASP Source Codes
C Source Codes
C++ Source Codes
COBOL Source Codes
Java Source Codes
Pascal Source Codes
Submit Source Codes
GATE
GATE an Overview
GATE Preparation
Study Materal
GRE
GRE an Overview
GRE Questions
GRE Preparation
GRE Universities
TOEFL Preparation
TOEFL Resources
GMAT Preparation
GMAT Resources
MBA Preparation
MBA Resources
Networking Concepts
Networking Concepts
Testing Preparation
Testing Resources
Webmasters
Free Traffic Builder
Webmaster Articles
Web Hosting
Tutorials
Hardware Tutorial
1500 Free eBooks New!


Home » Placement Papers » Mphasis Placement Papers » Mphasis Previous Year Placement Paper

 

Mphasis Placement Paper -: Java Questions With Answers


Advertisements
Advertisements




Mphasis Previous Years Solved Sample Placement Papers

  1. What is the purpose of the "super" keyword in Java?

    A: To refer to the current object

    B: To invoke the superclass constructor or methods

    C: To create multiple instances of a class

    D: To hide data and methods within a class

    Ans: B
  2. What is the purpose of the "this" keyword in Java?

    A: To refer to the superclass

    B: To create multiple instances of a class

    C: To hide data and methods within a class

    D: To refer to the current object

    Ans: D
  3. What is the purpose of the "final" keyword in Java?

    A: To prevent the inheritance of a class

    B: To prevent overriding of a method

    C: To prevent modification of a variable's value

    D: All of the above

    Ans: D
  4. What is an interface in Java?

    A: A class

    B: A data type

    C: A blueprint for a class

    D: A data structure

    Ans: C
  5. Which keyword is used to implement an interface?

    A: extends

    B: new

    C: interface

    D: implements

    Ans: D
  6. Can an interface extend another interface in Java?

    A: No

    B: Yes

    Ans: B
  7. Can an interface have a constructor?

    A: Yes

    B: No

    Ans: B
  8. Which of the following access modifiers are implicitly applied to variables in an interface?

    A: private

    B: protected

    C: public

    D: default

    Ans: C
  9. Is it possible to create an instance of an interface?

    A: Yes

    B: No

    Ans: B
  10. How many interfaces can a Java class implement?

    A: None

    B: Only one

    C: Two

    D: As many as needed

    Ans: D
  11. Can an interface inherit from a class?

    A: Yes

    B: No

    Ans: B
  12. Can an interface method be declared as final?

    A: Yes

    B: No

    Ans: B
  13. In Java 9, which type of methods can be added to interfaces to share code between methods?

    A: Static

    B: Private

    C: Final

    D: Protected

    Ans: B
  14. An interface with no methods is known as?

    A: Abstract Interface

    B: Marker Interface

    C: Empty Interface

    D: Functional Interface

    Ans: B
  15. Which keyword is used to define a default method in an interface?

    A: static

    B: default

    C: final

    D: abstract

    Ans: B
  16. Are all methods in an interface abstract?

    A: Yes

    B: No

    Ans: B
  17. Which of these can be contained in an interface?

    A: Abstract methods

    B: Constants

    C: Default and static methods

    D: All of the above

    Ans: D
  18. Which Java feature helps achieve multiple inheritance?

    A: Abstract classes

    B: Static methods

    C: Interfaces

    D: Enums

    Ans: C
  19. What is the default access modifier of a method in an interface in Java?

    A: private

    B: protected

    C: public

    D: None of the above

    Ans: C
  20. Why were default methods introduced in Java 8 interfaces?

    A: To provide multiple inheritance

    B: To add utility functions

    C: To provide backward compatibility with older interface versions

    D: For better performance

    Ans: C
  21. Starting from which Java version can an interface contain method implementations?

    A: Java 5

    B: Java 7

    C: Java 8

    D: Java 9

    Ans: C
  22. What is the purpose of the instanceof operator?

    A: Multiply instances

    B: Compare two object references

    C: Check if an object is an instance of a specific class or interface

    D: To create a new instance of a class

    Ans: C
  23. Which keyword is used to declare a class variable?

    A: volatile

    B: transient

    C: static

    D: final

    Ans: C
  24. Which keyword is used to prevent a class from being inherited?

    A: final

    B: abstract

    C: class

    D: extends

    Ans: A
  25. Which keyword is used to create an instance of a class?

    A: new

    B: return

    C: this

    D: create

    Ans: A
  26. Which keyword is used to inherit the properties and methods from another class?

    A: import

    B: package

    C: extends

    D: implements

    Ans: C
  27. Which keyword is used to refer to the current instance of a class?

    A: class

    B: this

    C: instance

    D: object

    Ans: B
  28. Which keyword in Java is used for importing packages into a program?

    A: import

    B: package

    C: include

    D: requires

    Ans: A




 


.

Recently Updated: New Placement Papers added.
Vyom Network : Web Hosting | Dedicated Server | Free SMS, GRE, GMAT, MBA | Online Exams | Freshers Jobs | Software Downloads | Programming & Source Codes | GRE Preparation | Jobs, Discussions | Software Listing | Free eBooks | Free eBooks | Free Business Info | Interview Questions | Free Tutorials | International Business Information | IAS Preparation | Jokes, Songs, Fun | Free Classifieds | Free Recipes | FAQs | Free Downloads | Bangalore Info | Tech Solutions | Project Outsourcing, Web Hosting | GATE Preparation | MBA Preparation | SAP Info | Excellent Mobiles | Software Testing | Interview Questions | Freshers Jobs | Server Insiders | File Extension Directory

Copyright ©2003-2024 Vyom Technosoft Pvt. Ltd., All Rights Reserved. Read our Privacy Policy