part of my code is "Obsolete" how do I fix it?

Hi.
I got a lot of messages in the console window

Assets/Scripts/Controller.js(284,17): BCW0012: WARNING: 'UnityEngine.GameObject.active' is obsolete. GameObject.active is obsolete. Use GameObject.SetActive(), GameObject.activeSelf or GameObject.activeInHierarchy.

and I though that I probably had to fix it.

This is my code where the console says I should change it

function Start () 
{
	Camera1.active = true;
    Camera2.active = false;
}

how could I change this without getting any errors?

function Start ()
{
Camera1.SetActive (true);
Camera2.SetActive (false);
}

Camera1.SetActive(true);