Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Explain abstract method in java?
Java permits methods and classes to be declared abstract. An abstract method is not actually implemented in the class. It is merely declared there. The body of the method is then implemented in subclasses of in which class. An abstract method must be element of an abstract class. You create abstract classes through adding the keyword abstract after the access specifier, e.g.
public abstract class MotorVehicle
Abstract classes cannot be instantiated. It is a compile-time error to try something like MotorVehicle m = new MotorVehicle();when MotorVehicle has been declared to be abstract. MotorVehicle is in fact a pretty good instance of the sort of class that might be abstract. You're unlikely to be interested in a general motor vehicle. Rather you'll have trucks, motorcycles, cars, go-carts and other subclasses of MotorVehicle, but nothing which is only a MotorVehicle.
An abstract method gives a declaration but no implementation. Instead, it has no method body. Abstract methods can only exist inside abstract classes and interfaces. For instance, the MotorVehicle class might have an abstract fuel() method:
public abstract void fuel();
Car would override/implement this method also with a fuel() method which filled the gas tank along with gasoline. EighteenWheelerTruck might override this techniques with a fuel() method that filled its gas tank with diesel. ElectricCar would override/implement this method with a fuel() method that plugged into the wall socket.
Java Program Development and Execution Steps Java program normally go through five phases. These are 1. Edit, 2. Compile, 3. Load, 4. Verify and 5. Execute Co
What is the difference between an Interface and an Abstract class? An abstract class can have instance methods that execute a default behavior. An Interface can only declare co
The game of Life, invented by John Conway, is supposed to model the genetic laws for birth, survival, and death (see Scienti_c American, October 1970, p. 120). We will play it on a
An aspect is the cross-cutting functionality that you are executing. It is the aspect of your application you are modularizing. An example of an aspect is logging. Logging is somet
Write a programme to create a webpage that prints the name of the STUDENT database in Wide Latin font and set the subtitle with description of the STUDENT to the screen. Set the pa
How can we define a computer screen? A computer screen is define as use to display output of computer to the user. Computer screen is consists of pixels.
I need help me this program
Employee get data from console
Employee application Project Description: Subsequent Technology should be used 1) UI (jsp, jstl ,html, etc) 2) Framework (Spring MVC and hibernate) 3) Database (MYSQ
Individual Assignment Rework Asteroids to have a different gameplay In the previous assignments, we have developed an Asteroids game. In this assignment, we are going to u
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +1-415-670-9521
Phone: +1-415-670-9521
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd