rummanansari Template
  • Home
  • Blog
    • Blog - HOME
    •   Technical
    • Search Engine Optimization
    • Data Structure
    • Image Processing
    • C Programming
    • .NET
    • SQL Server
    • TCS Preparation
    • Miscellaneous
    •   Non Technical
    • Top 10
    • Life Lesson
    •   Quotes
    • English Quotes
    • Bangla Quotes
    • Bangla to English Translations
    • Bangla Kobita
    • Bangla Whatsapp Story
  • Topics
    • GK - HOME
    • Basic GK
    • General Science
    • Honours and Awards
    • Inventions
    • World Organisations
    • Important Days
    • World Geography
    • Indian Geography
    • Indian History
    • Computer Awareness
    • MS excel, office etc.
    • Problems on Train
    • more...
  • Course
    • Library Home
    • AJAX
    • AngularJS
    • Arithmetic Aptitude
    • Artificial intelligence
    • Automata Theory
    • AZ-400: Designing and Implementing Microsoft DevOps Solutions
    • Azure DevOps for Beginners
    • Bangla to English
    • Biography
    • Biology
    • Bootstrap 4
    • C Programming Language
    • C Programming Language Video Bangla
    • C# Programming Language
    • C++ language
    • Competitive Exam
    • Computer Awareness Video
    • Computer Fundamentals
    • Computer Network
    • Computer Science and Engineering
    • Continuous Deployment
    • Continuous Integration
    • CSS
    • Current Affairs
    • Data Structure
    • Database Management System
    • Digital Logic
    • Education
    • Electrical Engineering
    • English
    • English Grammar
    • General Aptitude
    • Geography
    • History
    • HTML 5
    • Important Days and Dates
    • Interview Questions
    • ISC - COMPUTER SCIENCE - XI
    • Islam
    • Java Programming Language
    • JavaScript
    • Leadership behavior and Culture
    • Logical Fallacy
    • Machine Learning
    • Mastering HTML: From Fundamentals to Advanced Concepts
    • Mathematics
    • Mathematics for Programming
    • Mathematics in Bangla - Class 5
    • MB-310: Microsoft Certified: Dynamics 365 Finance Functional Consultant Associate
    • MB-330: Microsoft Certified: Dynamics 365 Supply Chain Management Functional Consultant Associate
    • MB-700: Microsoft Dynamics 365: Finance and Operations Apps Solution Architect
    • MB-920: Microsoft Dynamics 365 Fundamentals (ERP)
    • Microservices Architecture
    • Microsoft Azure
    • Microsoft Excel - Bangla
    • Mindwork games
    • Miscellaneous Topics
    • Misconceptions about Islam
    • MySQL
    • Neural Networks and Deep Learning
    • NPM - Package Manager
    • Pakistan Geography
    • Photoshop
    • PHP
    • Programming Language
    • Prompt Engineering
    • Puzzles
    • Python
    • R Programming Language
    • ReactJS
    • Science
    • Social Science
    • SQL
    • SQLite
    • Tamil Nadu State board (Class 10)
    • Technical MCQs
    • Technical Short Answers
    • TypeScript - JavaScript's Superset
    • UGC NET, SET
    • User Experience
    • Verbal and Reasoning
    • Vue JS
    • অতীত ও ঐতিহ্য: অষ্টম শ্রেণীর: পশ্চিমবঙ্গ মধ্যশিক্ষা পর্ষদ
    • অর্থনীতি
    • আরবী ভাষা কোর্স - Diploma in Arabic language
    • ইতিহাস
    • ইতিহাস ও পরিবেশ: দশম শ্রেণি: পশ্চিমবঙ্গ মধ্যশিক্ষা পর্ষদ
    • ইসলামিক বই
    • ইসলামে আকীকা
    • ইসলামে নারী
    • এসো আরবী শিখি
    • কুরআন
    • খাদ্য, পুষ্টি ও খাদ্যের উপাদান
    • জীবনবিজ্ঞান ও পরিবেশ (দশম)
    • তাহারাত কুইজ প্রতিযোগিতা
    • নবীদের কাহিনী - The story of the prophets
    • পরিবেশ ও বিজ্ঞান
    • প্যারেন্টিং - Parenting
    • প্রচলিত ভুল বিষয়ে প্রতিযোগিতা টেস্ট কুইজ
    • প্রশ্নোত্তরে ইসলামী জ্ঞান
    • বাংলা ইসলামিক কুইজ - Bangla Islamic Quiz
    • বাংলা সাহিত্য
    • ব্যক্তিগত উন্নয়ন (Personal Development)
    • ভূগোল
    • মডার্ন কম্পিউটার অ্যাপ্লিকেশন - একাদশ শ্রেণী
    • মডার্ন কম্পিউটার অ্যাপ্লিকেশন - দ্বাদশ শ্রেণী
    • লেখক এবং কবি
    • শয়তান পরিচিতি
    • সংক্ষিপ্ত জীবনী
    • সাধারণ জ্ঞান
    • সাহাবীদের জীবনী
    • সীরাত প্রতিযোগিতার প্রশ্ন ও উত্তরসমূহ
  • Paid Courses
    • Library Home
    • X++ Programming Language
    • X++ Programming Fundamentals - D365 F&O Technical
    • D365 F&O MCQ Questions - X++ Programming Language MCQ
    • ICSE Computer Applications Class 10 – Previous Year Question Papers & Solutions
    • GH-300: GitHub Copilot
    • Java Fundamentals: Building Strong Foundations
    • MB-500: Microsoft Dynamics 365: Finance and Operations Apps Developer
    • Authentication
    • Digital Productivity
    • Mastering JavaScript: From Fundamentals to Advanced Concepts
  •  Login
    • Login - Dashboard
    • Login - Here
    • About Our Team
    • Privacy Policy
    • Terms and Conditions
    • Cancellation and Refund Policy
    • Shipping and Delivery Policy
    • Guest Post Rule
    • Contact Us
Menu

Login and Register

Go to Dashboard Logged In Successfully!


Check your Email for the OTP


  • Login
  • Registration
  • Forget Password



Inheritance in Java (IS-A) - Quiz

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10

A mechanism where one class acquires the properties of another class:

  • APolymorphism
  • BInheritance
  • CEncapsulation
  • DAbstraction

Identify the type of operator &&:

  • Aternary
  • Bunary
  • Clogical
  • Drelational

The Scanner class method used to accept words with space:

  • Anext()
  • BnextLine()
  • CNext()
  • DnextString()

The absence of which statement leads to fall through situation in switch case statement?

  • Acontinue
  • Bbreak
  • Creturn
  • DSystem.exit(0)

Write a method prototype name check() which takes an integer argument and returns a char:

  • Achar check()
  • Bvoid check (int x)
  • C check (int x)
  • Dchar check (int x)

The number of values that a method can return is:

  • A1
  • B2
  • C3
  • D4

Predict the output of the following code snippet: String P = "20", Q ="22";

 int a = Integer.parseInt(P);
int b = Integer.valueOf(Q);
System.out.println(a+""+b);

  • A 20
  • B 20 22
  • C2220
  • D22

Which of these keywords is used to inherit a class in Java?

  • A super
  • B this
  • C extends
  • D implements

What is the parent class of all Java classes?

  • A Object
  • B Class
  • C Parent
  • D Base

Which keyword is used to call a constructor of the immediate parent class in Java?

  • A this
  • B parent
  • C extends
  • D super
Results:
🟢 Correct Answers:   🔴 Wrong Answers:

💹 View Detailed Quiz Results

🛫 Take Another Quiz
Login to save results
Quiz Information
Quiz Information

Quiz Platform FAQ

General Information

  • Number of Questions: Each quiz consists of 10 questions.
  • Time Limit: You have 30 seconds per question. The total time to complete the quiz is 5 minutes.
  • Multiple Attempts: You can take the quiz multiple times to improve your score.

Results and Feedback

  • Result Analysis: After completing the quiz, you will see a results page with the following details:
    • Correct Option for each question.
    • Your Selected Option for each question.
    • Explanation for each answer to help you understand why it is correct or incorrect.
    • Percentage of Correct Answers to show your overall performance.
  • Interactive Features: The platform provides feedback on each attempt to help you learn and improve.

Important Instructions

  • Do Not Refresh: Do not refresh the page while taking the quiz. Refreshing the page will end the current quiz and a new quiz will start.
  • Saving Your Quiz: To save your quiz progress and questions, log in to your account. Once logged in, you can view saved quizzes in your profile section.
  • Mandatory Selection: All questions are mandatory to select. If you do not select all 10 questions, you will not be able to submit the quiz. Once all questions are selected, you will be able to see the Submit button. If you wait until the end of the time, the quiz will be auto-submitted by the system, and you will be able to see your results.

Tips for Taking the Quiz

  • Manage Your Time: Keep track of the time for each question to ensure you have enough time to answer all 10 questions.
  • Review Explanations: After the quiz, read the explanations provided for each answer to enhance your understanding of the material.
  • Retake the Quiz: If desired, take the quiz again to improve your score and reinforce your learning.
  • Avoid Refreshing: To prevent losing progress, avoid refreshing the page during the quiz.
  • Log In to Save: If you want to save your quiz progress, log in to your account and check your profile section for saved quizzes.
Quiz Analytics

Inheritance in Java (IS-A) - Quiz

Guest User clock Time Taken:
Questions: Answered: Not Answered:
rightCorrect Answer: wrongWrong Answer: percentage smallPercentage: %

Q: A mechanism where one class acquires the properties of another class:

  • A. Polymorphism
  • B. Inheritance
  • C. Encapsulation
  • D. Abstraction
Correct Option: B
Remarks:

Explanation:

Inheritance

Q: Identify the type of operator &&:

  • A. ternary
  • B. unary
  • C. logical
  • D. relational
Correct Option: C
Remarks:

Explanation: logical

Q: The Scanner class method used to accept words with space:

  • A. next()
  • B. nextLine()
  • C. Next()
  • D. nextString()
Correct Option: B
Remarks:

Explanation: nextLine()

Q: The absence of which statement leads to fall through situation in switch case statement?

  • A. continue
  • B. break
  • C. return
  • D. System.exit(0)
Correct Option: B
Remarks:

Explanation: break

Q: Write a method prototype name check() which takes an integer argument and returns a char:

  • A. char check()
  • B. void check (int x)
  • C. check (int x)
  • D. char check (int x)
Correct Option: D
Remarks:

Explanation: char check (int x)

Q: The number of values that a method can return is:

  • A. 1
  • B. 2
  • C. 3
  • D. 4
Correct Option: A
Remarks:

Explanation:

In most programming languages, a method can return only one value at a time. Therefore, the correct answer is (a) 1. When you define a method and specify a return type, you are indicating the type of value that the method will return. The method can perform computations, process data, and then provide a single result of the specified type.

For example, in Java, a method declaration might look like this:


public int add(int a, int b) {
    return a + b;
}

In this example, the add method takes two integer parameters (a and b) and returns a single integer result, which is the sum of a and b. The method specifies int as the return type, indicating that it will return an integer value.

If a method needs to return multiple values, one common approach is to use other data structures like arrays, objects, or collections to bundle and return multiple values within a single container.

Q: Predict the output of the following code snippet: String P = "20", Q ="22";


 int a = Integer.parseInt(P);
int b = Integer.valueOf(Q);
System.out.println(a+""+b);

  • A. 20
  • B. 20 22
  • C. 2220
  • D. 22
Correct Option: C
Remarks:

Explanation:

The correct answer is:

(c) 2220

Explanation:

  1. int a = Integer.parseInt(P); - Converts the string "20" to an integer and assigns it to variable a.
  2. int b = Integer.valueOf(Q); - Converts the string "22" to an integer and assigns it to variable b.
  3. System.out.println(a + "" + b); - Concatenates the values of a and b as strings and prints the result. In this case, it prints "20" + "22", resulting in "2022".

Q: Which of these keywords is used to inherit a class in Java?

  • A. super
  • B. this
  • C. extends
  • D. implements
Correct Option: C
Remarks:

Explanation:

In Java, the extends keyword is used to indicate that one class is inheriting the properties and methods of another class. For example, public class SubClass extends SuperClass shows that SubClass inherits from SuperClass. Inheritance allows a class to use methods and fields from another class, promoting code reuse and logical hierarchies in object-oriented programming. This structure facilitates polymorphism and method overriding, which are essential features of Java's object-oriented paradigm. The implements keyword, on the other hand, is used when a class wants to implement an interface. super is used to refer to the immediate superclass, and this refers to the current instance of the class.

Q: What is the parent class of all Java classes?

  • A. Object
  • B. Class
  • C. Parent
  • D. Base
Correct Option: A
Remarks:

Explanation:

In Java, Object is the superclass of all other classes. Every class in Java, either directly or indirectly, inherits from the Object class. This means that methods defined in the Object class, such as toString(), hashCode(), and equals(), are available to all Java classes. This inheritance forms the root of Java's class hierarchy, providing fundamental behavior that all Java objects share. Understanding this concept is crucial for utilizing polymorphism and implementing custom behavior in subclasses.

Q: Which keyword is used to call a constructor of the immediate parent class in Java?

  • A. this
  • B. parent
  • C. extends
  • D. super
Correct Option: D
Remarks:

Explanation:

In Java, the super keyword is used to refer to the immediate parent class. When used in a constructor, super() calls the constructor of the parent class. This is essential when the superclass has a parameterized constructor or when you want to ensure that the parent class's initialization logic runs before the subclass's logic. The super keyword can also be used to access methods and variables of the parent class that might be overridden in the subclass.

Useful Links

  • Home
  • About us
  • Terms of service
  • Guest Post
  • Advertisement

Login

  • login
  • Sign Up

Visit All Home

  • Syllabus
  • Subject
  • Library
  • GK/MCQ
  • Blog

Social Links

  • Join Whatsapp Group
  • Join Telegram Group
© Copyright rummanansari. All Rights Reserved
Designed by rummanansari.com

You have unsaved changes or are in the middle of a quiz. If you leave, your progress might be lost. Select option for all questions.