A little help for a starter

Hi guys, I’m following a tutorial but I guess it’s a bit old, and I made this simple script to make a cube rotate, but it doesnt.

using UnityEngine;

public class Mover : MonoBehaviour {

float deltarotation = 30f;
// Use this for initialization
void Start ()
{

}

// Update is called once per frame
void Update ()
{

}

void rotate()
{
if(Input.GetKey(KeyCode.Q))
transform.Rotate(new Vector3(0f, -deltarotation, 0f) * Time.deltaTime);
else if (Input.GetKey(KeyCode.E))
transform.Rotate(new Vector3(0f, +deltarotation, 0f) * Time.deltaTime);

}
}

What am I doing wrong? Thanks!

You never call the method rotate() in your script. I assume you want to do something like this:

void Update ()
{
    rotate();
}