UrbanPro

Learn Java Training from the Best Tutors

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

Search in

Is it possible to instantiate the abstract class?

Asked by Last Modified  

31 Answers

Learn Java

Follow 2
Answer

Please enter your answer

Java, Angular Trainer with 22 years of IT experience

Use anonymous class. Example: For an abstract class AbstrClass. AbstrClass ac = new AbstrClass() { public void m1() { // code of abstract method m1. } } ;
Comments

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

You cannot directly create the object of an abstract class... But you can create object reference of the abstract class
Comments

Experienced Java Professional

Abstract classes cannot be instantiated - this is by definition and design. From the JLS, Chapter 8. Classes: A named class may be declared abstract (§8.1.1.1) and must be declared abstract if it is incompletely implemented; such a class cannot be instantiated, but can be extended by subclasses.
Comments

Computer Classes

there is no possible to instantiate the abstract class
Comments

Expert in Java J2EE Training

No. 'Abstract' means incomplete. Abstract class is also an incomplete class. Only concrete classes can be instantiated.
Comments

Certified Hadoop Developer with Spark Expertise

We cant instantiate the abstract class. but one we can create the object for the abstract class. using giving dummy implementations for unimplemented methods.
Comments

7+ year of corporate Experience in Manual & Automation(Java + Selenium) Testing in IT industry

An abstract class is a class which have either an abstract method and a non-abstract method. When the method is abstract, then the class should be abstract. The abstract class have a constructor. An abstract class is an incomplete class. Hence we should extend to another class and provide body to unimplemented...
read more

An abstract class is a class which have either an abstract method and a non-abstract method.

When the method is abstract, then the class should be abstract. The abstract class have a constructor.

An abstract class is an incomplete class. Hence we should extend to another class and provide body to unimplemented methods.

read less
Comments

Trainer

No
Comments

Expert SDET

No. You cann't instantiate the abstract class
Comments

Senior Software Engineer

No, you are not creating the instance of your abstract class here. Rather you are creating an instance of an anonymous subclass of your abstract class. And then you are invoking the method on your abstract class reference pointing to subclass object.
Comments

View 29 more Answers

Related Questions

What do you understand by Object and Class?

A class provides the blueprints for objects. So basically, an object is created from a class. That can be used anywhere as you wish.
Afsal
What is the use of package in JAVA?
Have you ever observed why we all are having kitchen / hall / bedroom or any? Have you ever observed why most of the bags contains zips and folders ? Have you ever observed why people create different...
Pushpendra
Can you use abstract and final both with a method? Why?
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...
Sushil

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

Ask a Question

Related Lessons

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

JAVA OOPs Concepts (Object-Oriented Programming System)
JAVA OOPs Concepts (Object-Oriented Programming System) It is primarily having below crucial points. Without below essential points, we will never be able to achieve OOPs in java, PHP, C#, etc. Now let...

Introduction to Course Content
Video about what we are going to learn throughout the Java Training Session .

Importance of Constructor's Visibility.
While developing program or implementing Singleton pattern we have learnt to mention constructor as private and known reason is -> to blocked its direct call from outside of class. But did we think...
M

Why Should We Learn Java Language?
Most of starters has confusion today that which of the programming language should be chosen to work on. It totally depends upon your need. As per my opinion, if you want to grow your career in IT industry...

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 >

In the domain of Information Technology, there is always a lot to learn and implement. However, some technologies have a relatively higher demand than the rest of the others. So here are some popular IT courses for the present and upcoming future: Cloud Computing Cloud Computing is a computing technique which is used...

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