Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Answer the following questions based on your knowledge of inner class: Why the declaration of Class4 inside Class2 does not make any sense? public class

image text in transcribedAnswer the following questions based on your knowledge of inner class:

Why the declaration of Class4 inside Class2 does not make any sense?

public class class2 { public void class2Method() { memberMethod (new class1() { @Override public void myclass1Method() { // some code here } }); button1.addActionListener(new Btnclicker()); button2.addActionListener(new ActionListener() { @Override public void actionPerformed (ActionEvent e) { class3 c3 = new class3(); Btnclicker bc = new Btnclicker(); // some code here } }); } static class class 4 // some code here } class Btnclicker implements ActionListener { @Override public void actionPerformed (ActionEvent e) { // some code here } } class class3 } public void anotherclassMethod() { class class3 { // some code here } // some code here } abstract class class1 { public abstract void myclass 1Method(); }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions