
Flashcard on OOPs Concepts

Flashcard
•
Computers
•
University
•
Hard
Wayground Content
FREE Resource
Student preview

28 questions
Show all answers
1.
FLASHCARD QUESTION
Front
What will be the output of the following code?
interface A {
void method();
}
abstract class B implements A {
public void method() {
System.out.println("Class B");
}
}
class C extends B {
}
public class Main {
public static void main(String[] args) {
C obj = new C();
obj.method();
}
}
Back
Class B
2.
FLASHCARD QUESTION
Front
What will be the output of the following code?
abstract class Animal { abstract void makeSound(); static void sleep() { System.out.println("Sleeping..."); } } class Dog extends Animal { void makeSound() { System.out.println("Bark"); } } public class Main { public static void main(String[] args) { Dog d = new Dog(); d.makeSound(); Animal.sleep(); } }
Back
Bark Sleeping...
3.
FLASHCARD QUESTION
Front
What will happen when the following code is executed?
interface A {
static void display() {
System.out.println("Interface A");
}
}
class B implements A {}
public class Main {
public static void main(String[] args) {
B obj = new B();
obj.display();
}
}
Options: A) Interface A, B) Compilation error, C) Runtime error, D) None of the above
Back
Compilation error
4.
FLASHCARD QUESTION
Front
What will be the output of the following code?
abstract class A { A() { System.out.println("Abstract class A constructor"); } } class B extends A { B() { System.out.println("Subclass B constructor"); } } public class Main { public static void main(String[] args) { B obj = new B(); } }
Back
Abstract class A constructor
Subclass B constructor
5.
FLASHCARD QUESTION
Front
Which of the following statements about abstract classes is FALSE?
Options: A) An abstract class can have final methods, B) An abstract class can implement an interface
, C) An abstract class cannot have a constructor
, D) An abstract class can have static methods
Back
An abstract class cannot have a constructor
6.
FLASHCARD QUESTION
Front
What is the correct way to define multiple interface implementations?
Options: A) class A extends B, C {}, B) class A implements B, C {}
, C) class A implements B extends C {}
, D) class A implements B & C {}
Back
class A implements B, C {}
7.
FLASHCARD QUESTION
Front
If a class implements multiple interfaces with methods having the same signature, what happens?
Back
The class must provide a single implementation for the method.
Create a free account and access millions of resources
Similar Resources on Wayground
17 questions
Java-Flashcard for Boyz

Flashcard
•
University
24 questions
PSUEDOCODE 2 CAPGEMINI

Flashcard
•
Professional Development
15 questions
Introduction to Java

Flashcard
•
University
18 questions
Flashcard on Constructors, Destructors & Inheritance

Flashcard
•
University
20 questions
debug2Main

Flashcard
•
University
18 questions
Java Method

Flashcard
•
12th Grade
23 questions
Beginning C Programming

Flashcard
•
University
23 questions
AP CSA Unit One Review

Flashcard
•
11th Grade
Popular Resources on Wayground
10 questions
SR&R 2025-2026 Practice Quiz

Quiz
•
6th - 8th Grade
30 questions
Review of Grade Level Rules WJH

Quiz
•
6th - 8th Grade
6 questions
PRIDE in the Hallways and Bathrooms

Lesson
•
12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
15 questions
Subtracting Integers

Quiz
•
7th Grade
Discover more resources for Computers
15 questions
Let's Take a Poll...

Quiz
•
9th Grade - University
2 questions
Pronouncing Names Correctly

Quiz
•
University
34 questions
WH - Unit 2 Exam Review -B

Quiz
•
10th Grade - University
21 questions
Mapa países hispanohablantes

Quiz
•
1st Grade - University
10 questions
Transition Words

Quiz
•
University
5 questions
Theme

Interactive video
•
4th Grade - University
25 questions
Identifying Parts of Speech

Quiz
•
8th Grade - University
10 questions
Spanish Greetings and Goodbyes!

Lesson
•
6th Grade - University