in Technology by

Which of the following is true about the anonymous inner class?

a) It has only methods

b) Objects can't be created

c) It has a fixed class name

d) It has no class name

🔗Reference: stackoverflow.com

🔗Source: Java Interview Questions and Answers

1 Answer

0 votes
by

Answer: (d) It has no class name

Explanation: Anonymous inner classes are the same as the local classes except that they don't have any name. The main use of it is to override methods of classes or interfaces. And the rest three options are false about the anonymous inner classes as it can have both methods and objects. It does not have any fixed came name.

Hence, the correct answer is option(d).

Related questions

0 votes
    In Java you can define a new class inline using anonymous inner classes. This is useful when you need ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 11, 2022 in Education by JackTerrance
0 votes
    In Java you can define a new class inline using anonymous inner classes. This is useful when you need ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 11, 2022 in Education by JackTerrance
0 votes
    In Java you can define a new class inline using anonymous inner classes. This is useful when you need ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 11, 2022 in Education by JackTerrance
0 votes
    In Java you can define a new class inline using anonymous inner classes. This is useful when you need ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 11, 2022 in Education by JackTerrance
0 votes
    What is true about functions : I) Functions are objects II) Can be assigned to a variable III) Can be anonymous IV) Return value type has ... , III 3. I, II, III, IV 4. I, II, IV...
asked Feb 25, 2021 in Technology by JackTerrance
0 votes
    What is true about functions : I) Functions are objects II) Can be assigned to a variable III) Can be anonymous IV) Return value type has ... , III C) I, II, III, IV D) I, II, IV...
asked Oct 9, 2020 in Technology by JackTerrance
0 votes
    Why is the span length ratio of end span/approach span to its neighboring inner spans usually about 0.75?...
asked Jan 3, 2021 in Technology by JackTerrance
0 votes
    #include struct A { bool f( int a ) { std::cout...
asked Feb 21, 2022 in Education by JackTerrance
0 votes
    Which of the below is true about java class structure? (a) The class name should start with lowercase (b) ... & Miscellaneous of Java Select the correct answer from above options...
asked Feb 23, 2022 in Education by JackTerrance
0 votes
    Which of the below is true about java class structure? (a) The class name should start with lowercase ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Oct 24, 2021 in Education by JackTerrance
0 votes
    What is true about Class.getInstance()? (a) Class.getInstance calls the constructor (b) Class.getInstance is ... questions and answers pdf, java interview questions for beginners...
asked Oct 26, 2021 in Education by JackTerrance
0 votes
    A special tool is necessary for entering the network which is _______________ that helps the anonymous internet users to ... ) Mozilla browser 3) Chrome browser 4) Tor browser...
asked Dec 30, 2020 in Technology by JackTerrance
0 votes
    What are Anonymous Types in C#?...
asked Apr 1, 2021 in Technology by JackTerrance
0 votes
    Anonymous functions can be created in JavaScript. What do anonymous function do? 1. Overwrite variables that are to ... Automatically define the scope of a value inside a parameter...
asked Feb 25, 2021 in Technology by JackTerrance
0 votes
    Anonymous functions can be created in JavaScript. What do anonymous function do? A) Overwrite variables that are to ... Automatically define the scope of a value inside a parameter...
asked Oct 9, 2020 in Technology by JackTerrance
...