how you will prevent method overriding?

Answers were Sorted based on User's Feedback



how you will prevent method overriding?..

Answer / ravi

by declaring the method has a final

Is This Answer Correct ?    24 Yes 1 No

how you will prevent method overriding?..

Answer / neelam,noida

final method can not overridden

Is This Answer Correct ?    22 Yes 0 No

how you will prevent method overriding?..

Answer / ravikiran

bu marking the method final

Is This Answer Correct ?    13 Yes 1 No

how you will prevent method overriding?..

Answer / sumit

One can prevent method overriding by marking the method final. if you make a method static and reuse it in the subclass it will hide the the super class method. This is called method hiding rather than overriding.

Is This Answer Correct ?    6 Yes 0 No

how you will prevent method overriding?..

Answer / murali.25

you also prevent overriding by making the method static

Is This Answer Correct ?    3 Yes 6 No

how you will prevent method overriding?..

Answer / sonam

You can prevent method overriding by declared method as
static

Is This Answer Correct ?    0 Yes 4 No

Post New Answer

More Core Java Interview Questions

In how many ways we can do exception handling in java?

0 Answers  


what is diffrence between .NET and java?

2 Answers  


What are exception handling keywords in java?

0 Answers  


What is aggregation?

1 Answers   Cap Gemini,


What is a boolean used for?

0 Answers  


What is update method called?

0 Answers  


What is lazy programming?

0 Answers  


Q1.A. Write note on “The class path Environment Variable”? B. Which are different kinds of source code? Q2.A. How to create an interface? B. Why convert an applet to an application? Q3.A. How to use Media tracker Class. B. How to use string tokenizer class. Q4 A. Explain the overview of UDP messaging. B. Difference between SQL Exception class and SQL Warning class. Q5. A. How to create com object in Java? B. Write short notes on “The properties class” Q6. A. When object is created and destroyed? B. Explain the JDB in depth & command line. C. Write short notes on Web Sites.

2 Answers   iGate, Seed Infotech,


What is balanced tree in java?

0 Answers  


Can constructor be inherited?

0 Answers  


Why are generics used?

0 Answers  


how to write a program for chat function using core java

1 Answers   Satyam,


Categories