S(t)=1-exp(-t/mu})

Now if I generate data from an exponential distribution, can the sample mean $\bar{x}$ be used to find S.hat(t) as an estimate of S(t)?

How about if I generate lifetimes from exponential distribution with different means (say, for males and females). Can the sample mean be used to find out the sample survival probability as an estimate of population survival probability then too?