| Question | Answer | % Correct |
|---|---|---|
| Which of the following isn't a function in the math class? | Math.int | 75%
|
| Which of the following is a proper way to collect user input through a scanner variable by the name of smartyPants? | double userDoub = smartyPants.nextDouble(); | 73%
|
| Which of the following successfully calls a method by the name of jetPunk? | jetPunk(); | 73%
|
| I have declared a string variable called word that is initialized as "Super". If I were to use the substring function and enter the parameters 1 and 3 respectively, what would be the output if printed? | upe | 73%
|
| Which of the following is a reference data type? | String | 71%
|
| Which of the following functions aren't in the String class? | String.spellOut | 62%
|
| I worked really hard on a program to compute the area of a square using user input, but it just WON'T WORK OUT! Here is my code: Scanner newDim = new Scanner(System.in); System.out.println("Enter a side of your square."); side = newDim.nextDouble(); area = Math.pow(side,2.0); System.out.println("Area:" + area); PLEASE HELP ME SOLVE THIS IM FREAKING OUT. MY THERAPIST IS SAYING THERE IS MORE THAN ONE ERROR SELECT THE OPTION THAT PINPOINTS BOTH ERRORS. | You haven't stated what data type area and side are. They should be doubles. | 62%
|
| Which of the following variables can store a value of 3.6? | double | 60%
|
| Which of the following is a proper way to declare a scanner? | Scanner maybeTheWrongAnswer = new Scanner(System.in); | 54%
|
| Which of the following describes a void method? | A method that prints a data type but doesn't return it | 40%
|