1 answer

IVOVI U UL Question 46 Suppose we have Random rand = new Random(); Which of the...

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 -
IVOVI U UL Question 46 Suppose we have Random rand = new Random(); Which of the following expression generates a random integer between 20 and 100, inclusive? rand.nextint() 96 80 rand.nextint() 96 80 + 20 rand.nextInt() % 81 rand.nextInt() % 81 + 20 A Moving to another question will save this response.
Moving to another question will save this response. Question 47 Suppose I have the following Scanner object: File file = new File("data txt") Scanner input = new Scanner(file); After I read data from file, which of the following close the file? input.close(: file.close(input); O input.close(file); file.close()
testion 48 Which of the following return true if char c is a lower case English letter. Assume that has been initialized. c.isLowerCase 97 <c && c < 122 C<= 65 && C<=97 Character.isLowerCase(c) A Moving to another question will save this response. ri FS
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 compile erron 97 c32 Moving to another question will save this response
Question so What is the output of the following code the core Assume and has been switch(score / 10) case 10: case 9: grade - 'A': break; case 8: grade - 'B'; break; case 7: grade - 'C'; break; case 6: grade 'D': break; default: grade - 'U': break; System.out.println(grade); There is a compile error in line 11 There is a compile error in line 12 OU

Answers

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);

.

Similar Solved Questions

1 answer
I need help with patterns and equations i cant find the rule it goes like dis input 0 out put 25 input 1 output 24 input 2 output 23 input 3 mising output input 4 missing output
i need help with patterns and equations i cant find the rule it goes like dis input 0 out put 25 input 1 output 24 input 2 output 23 input 3 mising output input 4 missing output...
1 answer
Claim: The mean pulse rate (in beats per minute) of adult males is equal to 68.9...
Claim: The mean pulse rate (in beats per minute) of adult males is equal to 68.9 bpm. For a random sample of 137 adult males, the mean pulse rate is 67.5 bpm and the standard deviation is 11.2 bpm. Complete parts (a) and (b) below. a. Express the original claim in symbolic form. bpm (Type an integer...
1 answer
In a survey of a group of men, the heights in the 20-29 age group were...
in a survey of a group of men, the heights in the 20-29 age group were nomaly distributed, with a mean of 67.4 nches and a standard deviaion of 4.0 inches. Astudy participart is randomly selected. Complete parts (a) though () below (a)Find the probability that a study particpant has a height that is...
1 answer
C. water moves i allu uut yuunny D. Water does not move in the above situation....
C. water moves i allu uut yuunny D. Water does not move in the above situation. 11 Which of the following terms would best describe the effects on that cell? A. Apoptosis B. Crenation C. Lysis D. No effect of the cell 12 You have chosen an acceptable IV fluid for your patient. After 30 minutes the p...
1 answer
1. What is the overall contribution margin (CM) ratio for the company? 2. What is the...
1. What is the overall contribution margin (CM) ratio for the company? 2. What is the company's overall break-even point in dollar sales? 3. Prepare a contribution format income statement at the company's break-even point that shows the appropriate levels of sales for the two products. ...
1 answer
The Nelson Company has $1,485,000 in current assets and $550,000 in current liabilities. Its initial inventory...
The Nelson Company has $1,485,000 in current assets and $550,000 in current liabilities. Its initial inventory level is $440,000, and it will raise funds as additional notes payable and use them to increase inventory. How much can Nelson's short-term debt (notes payable) increase without pushin...
1 answer
1 6. The general form of a linear, homogeneous, second-order equation with constant coefficients is dy...
1 6. The general form of a linear, homogeneous, second-order equation with constant coefficients is dy dy form. ns (b) Show that if q关0, then the origin is the only equilibrium point of the sys (c) Show, that if q关0, then the only solution of the second-order equation constant is y(t) ...
1 answer
Fill in the blank A researcher determines that the linear correlation coefficient is 0.85 for a...
Fill in the blank A researcher determines that the linear correlation coefficient is 0.85 for a paired data set. This indicates that there is OA. a strong positive linear correlation B. insufficient evidence to make any decision about the correlation of the data C. a strong negative linear correlati...
1 answer
Nsider the Game of Chicken depicted in the figure below, in which t each other must decide whethe...
need d, e and f answered. first picture is just for reference to the questions. nsider the Game of Chicken depicted in the figure below, in which t each other must decide whether or not to swerve. Player 2 Straight Swerve Player 1 Straight 0, 0 Swerve1,3 3, 1 2, 2 have a strictly dominant strat...
1 answer
Chavez Company most recently reconciled its bank statement and book balances of cash on August 31...
Chavez Company most recently reconciled its bank statement and book balances of cash on August 31 and it reported two checks outstanding, No. 5888 for $1,019 and No. 5893 for $517. Check No. 5893 was still outstanding as of September 30. The following information is available for its September 30 re...
1 answer
X(0) -90020 4) Solve for lup's - [-3x K te 42 12x7 at
X(0) -90020 4) Solve for lup's - [-3x K te 42 12x7 at...
1 answer
Are se of heat flow processes. I each diagram represents a physically possible or impossible process...
are se of heat flow processes. I each diagram represents a physically possible or impossible process (See the hint below for help interpreting the Qc QH...
1 answer
Geometry question
18. A carpenter must ensure that a large window frame is a rectangle. If the corners are labeled E, F, G, and H, the carpenter knows that EF= 51 inches, FG= 28inches, GH= 51 inches, and EH= 28 inches. The carpenter could measure the diagonals EG and FH and verify that they are the same length, but c...
1 answer
#3 * 3.89 Me! p=cogo4 wel respetxo.ch resy Pesca MP205=67158 Properties of Liquids and Solids Instructions:...
#3 * 3.89 Me! p=cogo4 wel respetxo.ch resy Pesca MP205=67158 Properties of Liquids and Solids Instructions: Answer the following questions using the following information: AH 6.02 kJ/mol; AH. 40.7 kJ/mol; specific heat of water is 4.184 J/g.'C; specific heat of ice is 2.06 1/8 'C; specific h...