---
# System prepended metadata

title: siddhi-java - by Shantanu N Kulkarni <s@zsh.in>

---

# siddhi-java - by Shantanu N Kulkarni <s@zsh.in>

## Abstract class

An abstract class is a parent class whose instance cannot be made
If you need an object make instance of one of its child.
Abstract class can have regular methods (concrete methods) and abstract methods.

Abstract methods contain only the method signature, while concrete methods declare https://tinyurl.com/siddhijava
a method body as well. Abstract classes are defined with the abstract keyword.

### Example TestWadekars

```java
abstract class Wadekars {
	abstract void paints() ;

	void run() {
		System.out.println("Wadekars run fast") ;
	}
}

class Siddhi extends Wadekars {
	void paints() {
		System.out.println("I can paint standing on 1 leg only and with both hands") ;
	}

	void run() {
		System.out.println("I run fast too") ;
	}
}


// let us now test these

class TestWadekars 	{
	public static void main(String[] args) {
	Wadekars myobj = new Siddhi() ;
	
	myobj.run()  ;
	myobj.paints() ;
	}
}
```

We have an abstract class Wadekars. Painting is a niche property of only one wadekar so it is an 
abstract method while all Wadekars can run, so it is a regular method.

Class Siddhi is child class of wadekars and can paint in a unique way (on any one leg and with both hands, hahahaha). While she runs fast too. So, for her both methods are regular.
,,
