Question: ? Question 1: True or False: The main method is called on line 9 above. Question 2: On line 18 above, the name of the
?
Question 1: True or False: The main method is called on line 9 above.
Question 2: On line 18 above, the name of the method that is being called is:
a) JOptionPane
b) JOptionPane.showMessageDialog
c) showMessageDialog
d) Display a dialog box on the screen.
Question 3: On line 18 above, how many actuals are sent to the method?
a) 1
b) 2
c) 3
d) 4
Question 4: True or False: Line 23 above is an example of a method call.
Question 5: On line 17, two methods are called. Which method returns first?
a) round
b) random
Question 6: True or False:
Consider the following statement:
JOptionPane.showMessageDialog(null, "Tricky Question");
showMessageDialog is a static method in the JOptionPane class.
Question 7: Which of the following (choose all that apply) can you use as resources to determine the methods that are available for you to call in a program?
a) Ask a fellow college student or colleague
b) Use the "intelli-sense" in Netbeans
c) Search the internet
d) Study the API
e) Email a Java Programmer
Question 8: True or False: When you call a method, the method can return at most 1 value.
Question 9: Consider the following code fragment:
int n;
Point p;
Color c;
c = new Color(200, 50, 128);
n = c.getRed( );
The getRed method:
a) is defined in the Point Class
b) is found in the object c
c) is defined in the Color class
d) is found in the object p
e) returns an int
Question 10: True or False: In the following statement:
c = Color.getColor("Cyan");
getColor is a static method of the Color class.
O i dentify method calls-NetBeans IDE 8.0 Eile Edit Yiew Navigate Source Refactor Bun Debug Profile Team Iools Window Help Search (Col+ edefault config> 6 public class IdentifyMethodCalls public static void maia (Stringt) arga) 10 12 13 14 15 16 17 10 19 20 21 char c long n. quess boolean correct talse: Sering um Scanner keyboard: keyboazd-new Scanner (Syatem-in) nMath. round (Hath. rando020+) JOptionPane. shovMessageDialog(null"Guess y number from 1 to 10 below."Guessing Game". JOptionPane. PLAIN MESSAGE) while (correct) Syacem.out-prine(Enter your quess: guess- keyboazd.nexelong O if (guessn) 23 24 25 26 27 28 29 30 31 32 System.out-printinCongrats My number was:"n) else System.out-printlnNope Tzy AgaD 34 24:7
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
