UrbanPro

Learn Java Training from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

Can you use abstract and final both with a method? Why?

Asked by Last Modified  

34 Answers

Learn Java

Follow 3
Answer

Please enter your answer

Trainer

No because we have to provide an abstract method with implementation in the subclass (the child class of the parent class in which the abstract method was declared). And for providing this implementation the abstract method has to be overridden in the child class. Since final methods cannot be overridden...
read more
No because we have to provide an abstract method with implementation in the subclass (the child class of the parent class in which the abstract method was declared). And for providing this implementation the abstract method has to be overridden in the child class. Since final methods cannot be overridden so we can't declare a method both abstract and final as by doing so you won't be able to implement the method in the child class as it was declared both final and abstract in the parent class. read less
Comments

Experienced Java Professional

No, we can not declare abstract method as final. We have to proved implementation to abstract methods in subclasses. and method declared as final mean don't override (or redefine) this method. So the abstract and final combination is contradicting with each other.
Comments

Computer Classes

No, we can not declare abstract method as final. We have to proved implementation to abstract methods in subclasses.
Comments

Certified Hadoop Developer with Spark Expertise

We should not write, because abstract meaning is partially implemented, so some one has to implement that, if we create that as final then we cant change that further.
Comments

IT Professional Trainer with 13 years of experience in IT industry + Academics

Nope..... Because abstract methods are needed to be defined in the subclass..So you can't have abstract final method because then after you can not define it
Comments

12 years of MNC company work experience on java ,J2ee technologies

No ,abstract and final both should not give to a method.Abstract method should be overriden in the subclasses.But final methods can't override.So these two rules are contradict.
Comments

Trainer

No, because we have to provide the implementation to methods in subclasses.
Comments

More than 12 years of experience in IT Industry including Science/Computer teaching

No, Abstract method cannot be declared as final. This is because, abstract method has to be overridden to provide implementation. If it is declared as final, it cannot be overridden.
Comments

Java Trainer

No, Abstract is meant to be overridden in subclass so it wont have method body and final means it cannot be overridden in subclass and method body needs to be provided.
Comments

Experienced Software Professional

No. This is so because an abstract method is there for implementation. Putting a final is illegal. A Final method needs to have a body or implementation. Final restricts further overriding of the method in any derived class.
Comments

View 32 more Answers

Related Questions

What is a constructor in Java?
Constructor is a special method to initialise Java objects. Usually initialisation logic is kept inside the constructor. Java compiler by default creates a default no arg constructor if no constructor is defined already.
Rishu
0 0
5
How do people become Java programmers?
Before you become a Java programmer, it's important that you earn an education and learn how to code using Java. While some programmers learn how to use Java on their own, you can learn it much faster...
Rishav
0 0
5
How do I show a popup message over a system tray icon/application in Java?
The java.awt.SystemTray class introduced in Java™ SE version 6 represents the system tray for a desktop. The system tray can be accessed by calling the static SystemTray.getSystemTray() method. Before...
Ajith
0 0
5
Which language has the best future prospects: Python, Java, or JavaScript?
According to me, "Python" is the programming language having the best future prospect considering the current industry trend. Reason: Python is extensively used in advanced technologies such as Machine...
Atharva
0 0
5
Write a programme to replace the string without using replace command? This is my string. ..... s is replaced by th output is Thith ith my thtring
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package logic; ...
Mithun

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

What Are IT Industries Performance Metrics?
1. Outstanding Expectation: Eligible to get Promotion easily and good salary hike. Always preferrable to go abroad. 2. Exceed Expectation: Can get Promotion as per schedule of company with good salary...

CoreJAVA
Core Java Training High Level Course Content Trained by Java Architect 1. Core Java Programming Introduction of Java 2. Data types and Operators 3. Control Flow statements 4. OOPS and its application...
A

CONDITIONAL STATEMENT - IF ELSE
1. IF condition only if is true conditon is required. if(condition){//statements} 2. IF-ELSE condition 1. to check whether the condition will be true or false.syntax of if-else2. only 1 conditionif(condition){//statements}else{//statements} 3....

Tips of learning Java Language/Other Programming Languages
1.You should know the basic concept: If we talk about programming languages so basic concept are same in all the high level languages. So you should know the basic concept firstly then you can easily understand...
I

ICreative Solution

0 0
0

jOOQ 3.10 Supports JPA Attribute Converter
One of the cooler hidden features in jOOQ is the JPADatabase, which allows for reverse engineering a pre-existing set of JPA-annotated entities to generate jOOQ code. For instance, you could write these...

Recommended Articles

Designed in a flexible and user-friendly demeanor, Java is the most commonly used programming language for the creation of web applications and platform. It allows developers to “write once, run anywhere” (WORA). It is general-purpose, a high-level programming language developed by Sun Microsystem. Initially known as an...

Read full article >

Before we start on the importance of learning JavaScript, let’s start with a short introduction on the topic. JavaScript is the most popular programming language in the world, precisely it is the language - for Computers, the Web, Servers, Smart Phone, Laptops, Mobiles, Tablets and more. And if you are a beginner or planning...

Read full article >

Java is the most commonly used popular programming language for the creation of web applications and platform today. Integrated Cloud Applications and Platform Services Oracle says, “Java developers worldwide has over 9 million and runs approximately 3 billion mobile phones”.  Right from its first implication as java 1.0...

Read full article >

Java is the most famous programming language till date. 20 years is a big time for any programming language to survive and gain strength. Java has been proved to be one of the most reliable programming languages for networked computers. source:techcentral.com Java was developed to pertain over the Internet. Over...

Read full article >

Looking for Java Training Classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for Java Training Classes?

The best tutors for Java Training Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Java Training with the Best Tutors

The best Tutors for Java Training Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more