0
We are told that an abstract method is a method that is declared without an implementation. What is an implementation, and how does this method look like exactly ?
In abstract classes
3 Antworten
+ 1
implementation refers to the code inside a method. in other words,what it does. For example:
public int Multiply(int x, int y)
{
return x * y;
}
in the above example Multiply would be the name of the method and return x*y is the implementation.
0
An abstract method is just the firm of the method inside an interface or abstract class
public String hello() ;
Then in a normal class you can implement that class
public normal class implements "some interface class whit the firm we want to implement" {
public String hello ()
System.out.println("hello") ;
}
}
0
thanx a lot guyz