Different classes of on-line algorithms are developed and analyzed for the solution of {0, 1} and relaxed stochastic knapsack problems, in which both profit and size coefficients are random variables. In particular, a linear time on-line algorithm is proposed for which the expected difference between the optimum and the approximate solution value is O(log(3/2) n). An Omega(1) lower bound on the expected difference between the optimum and the solution found by any on-line algorithm is also shown to hold.