in Education by
Which of the following is a method having same name as that of it’s class? (a) finalize (b) delete (c) class (d) constructor The question was posed to me in class test. My question is from Introduction To Methods topic in chapter Classes and Methods of Java Select the correct answer from above options Java questions and answers, Java questions pdf, Java question bank, Java questions and answers pdf, mcq on Java pdf, Java questions and solutions, Java mcq Test , Interview Java questions, Java Questions for Interview, Java MCQ (Multiple Choice Questions),Core Java Questions, Core Java MCQ,core java interview questions for experiencedcore java interview questions for 3 years experience,java programming questions,core java interview questions for freshers,java interview questions and answers for freshers, java programming questions and answers pdf, java interview questions for beginners

1 Answer

0 votes
by
 
Best answer
The correct answer is (d) constructor Best explanation: A constructor is a method that initializes an object immediately upon creation. It has the same name as that of class in which it resides.

Related questions

0 votes
    Which of the following is a method having same name as that of its class? (a) finalize (b) delete ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 26, 2021 in Education by JackTerrance
0 votes
    What is the process of defining a method in a subclass having same name & type signature as a method ... questions and answers pdf, java interview questions for beginners...
asked Oct 26, 2021 in Education by JackTerrance
0 votes
    Which of these can be used to differentiate two or more methods having the same name? (a) Parameters ... questions and answers pdf, java interview questions for beginners...
asked Oct 26, 2021 in Education by JackTerrance
0 votes
    What is the process of defining two or more methods within same class that have same name but different ... questions and answers pdf, java interview questions for beginners...
asked Oct 26, 2021 in Education by JackTerrance
0 votes
    If super class and subclass have same variable name, which keyword should be used to use super class? ( ... questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of these methods return a class object given its name? (a) getClass() (b) findClass() (c) ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of these method Map class is used to obtain an element in the map having specified key? (a) ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of these method of HashSet class is used to add elements to its object? (a) add() (b) ... java programming questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    If a class inheriting an abstract class does not define all of its function then it will be known as ... questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of these data type can be used for a method having a return statement in it? (a) void (b ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 26, 2021 in Education by JackTerrance
0 votes
    What is the name of a data member of class Vector which is used to store a number of elements in ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of the following method of Process class can terminate a process? (a) void kill() (b) void ... programming questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of the following is method of System class is used to find how long a program takes to execute ... questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
0 votes
    Which of the following exceptions is thrown by every method of Runtime class? (a) IOException (b) ... questions and answers pdf, java interview questions for beginners...
asked Oct 25, 2021 in Education by JackTerrance
...