> For the complete documentation index, see [llms.txt](https://docs.swttoken.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.swttoken.com/smart-contracts/creating-hello-world-smart-contract.md).

# Creating "Hello-world" Smart Contract

### Smart Contract on SWT Platform <a href="#smart-contract-on-credits-platform" id="smart-contract-on-credits-platform"></a>

They are developed with Java programming language, which allows one to develop and test smart contracts on any platform without the need to install a special development environment.

### Hello-World Smart Contract <a href="#hello-world-smart-contract" id="hello-world-smart-contract"></a>

Extending the class “**SmartContract**” is a mandatory condition for the implementation of a smart contract class.

```java
package com.example.contract;

import com.credits.scapi.annotations.*;

import com.credits.scapi.v2.SmartContract;

import com.credits.scapi.v1.*;

import java.math.BigDecimal;

public class my extends SmartContract {

    public my() {

    }

    @Override

    public String payable(BigDecimal amount, byte[] userData) {

        return null;

    }

    public String hello() {

        return "Hello!";

    }

}
```

{% hint style="info" %}
This simple smart contract contains only a class constructor and a class method that returns the string.
{% endhint %}
