public UnityEngine.UI.Text fixing errors.

For the closing } in the debugger I get the error Invalid token ‘}’ indexer class, struct, or interface member declaration

  using UnityEngine;

  using System.Collections;

  public class click : MonoBehaviour 
  {

          public UnityEngine.UI.Text

   }

If i put
public UnityEngine.UI.Text
out of the {} brackets it shows UnityEngine as an error if I add ; it shows up as the first error
I’m using unity 5.3.1 and the tutorial I was following was in unity 4.6.1
I’m guessing it’s something to do with the different versions but I don’t know what or how to do it for unity 5.3.1 ?

You have two problems. First, you’re not providing a variable name to be created. Second, you’re missing the line ending semicolon.

using UnityEngine;
using System.Collections;

public class click : MonoBehaviour 
{
    public UnityEngine.UI.Text varName;
}

You might want to watch Unity’s scripting tutorials, or look up some ones on YouTube about C#/Unity scripting basics.