39.0k views
3 votes
50 POINTS & A FOLLOW!

Which of the following statements contains an error?

(I) int digit = (int) (Math.random() * 10);

(II) lotteryNum = digit;

(III) //System.out.println(lotteryNum);

I only

 II only

 III only

 I and III only

 II and III only

User LoVo
by
7.8k points

2 Answers

3 votes

III has a typo: its print...lower case l (L)n; not print...cap I (i)n. ive made the same mistake be4!

I n II look good 2 me


User Otero
by
9.4k points
3 votes

There is an error in III: println is for print line so it is different from print(lotteryNum).


The answer is III only.


User Dcsan
by
8.7k points