answersLogoWhite

0

Can you write a methodname as same as class name?

Updated: 8/18/2019
User Avatar

Wiki User

13y ago

Best Answer

Yes. You can.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Can you write a methodname as same as class name?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the purpose of method overriding?

Assuming class A has a method named getXXX() and class B is a sub class of class A. Now, if we write a method with the same name getXXX() in class B, with exactly the same signature as class A, it is called overriding a method. The method getXXX() in class A becomes the overridden method.


What is the common class name for a shark?

The common class name for sharks and rays (they both belong to the same class, the Cartilaginous Fish), is Chondrichthyes.


How do you import a self created class in java?

It's the same as importing any other class: import [package name].[class name];


Should the constructor name and class name be same?

Every class object is created using the same new keyword, so it must have information about the class to which it must create an object. For this reason, the constructor name should be the same as the class name. To learn more about data science please visit- Learnbay.co


What condition a function must specify in order to create objects of a class?

The object must have same name as that of class name.


What conditions a function must specify in order to create objects of a class?

The object must have same name as that of class name.


How do you write class excuses latter?

To write a class excuse letter is not very difficult--you just have to take different precautions wether you are an adult or a student. If you are writing a class excuse as an adult, you might want to make the letter simple and short. It should only contain the teacher/instructor's name, your excuse, and your name. If you are a student, you should include the same things, but also your parent's signature or a doctor's note, etc.


Why you same name in class and file in java?

For run the program


What is constructor in cplusplus?

A constructor is a special member function which have same name as the class name.`


Your name is cherry how to write this name in Chinese in same phonetic sound with out translation?

To write the name "Cherry" in Chinese with a similar pronunciation, you can use the characters "查瑞" (Chá Ruì).


How do you compile and run with the same file name provided file name and class name are different?

You are supposed to use the same name for the filename and the class name. I am not entirely sure what happens otherwise; at the very least, I would expect that you would get unnecessary complications.


What is the Japanese name of wella?

names do not translate if you want to know how to write it ask:- how do i write "name" in japanese? said the same