Question

IVOVI U UL Question 46 Suppose we have Random rand = new Random(); Which of the following expression generates a random integ
Moving to another question will save this response. Question 47 Suppose I have the following Scanner object: File file = new
testion 48 Which of the following return true if char c is a lower case English letter. Assume that has been initialized. c.i
Question 49 What is the output of the following code segment? char c = A; char x = c +32: System.out.println(x); There is a
Question so What is the output of the following code the core Assume and has been switch(score / 10) case 10: case 9: grade -
0 0
Add a comment Improve this question Transcribed image text
Answer #1

1.Option D is correct.

rand.nextInt() % 81 + 20 is correct because Formula to find Random number with max and min value inclusive is ((max - min) + 1)+ min

In this max value is 100 and min value is 20 then( (100-20)+1) + 20=81 + 20.

2.Option D is correct.

file.close() is used to close the file.    close() is a method of FileOutputStream class.

3. Option D is correct.

Character.isLowerCase(c) returns true if char c is a lower case english letter.This method takes a character value and returns boolean value true and false.If it returns boolean value true that means character is in lowercase otherwise it returns false.

4.Option A is correct.

There is a compile error.(Type mismatch : cannot convert int to char).

char c='A';
   char x = c + 32; // cannot convert int to char.32 is not convert to character.
   System.out.println(x);

Add a comment
Know the answer?
Add Answer to:
IVOVI U UL Question 46 Suppose we have Random rand = new Random(); Which of the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT