Question
whats the answers

Assuming that the variable numDogs has been declared, select the statement which doesnt contain any syntax errors. System.ou
Which of the following statements is a valid declaration of a constant integer variable named STEP_SIZE? int STEP SIZE = 5; f
If the goal output is: Say Hello what needs to be written inside of the parenthesis in the print statement? System.out.prin
The following statement declares and assigns userName with Sarah. String userName = Sarah; String userName = Sarah; Oint
Given the following statements: firstString - senr.next(); secondString - sonr.next(); indicate what string will be put into
0 0
Add a comment Improve this question Transcribed image text
Answer #1

1. System.out.print("Amy // Michael");
System.out.print(numDogs);


2.
int STEP_SIZE = 5;
final int STEP_SIZE =14;


3.
"Say \"Hello"
Because the character '\' is a step sequence. When we put '\ before ", we tell the compiter to see " as a part of the string


4.
String userName = "Sarah";


5.
all
Because first next() will only take the string before space

Add a comment
Know the answer?
Add Answer to:
whats the answers Assuming that the variable numDogs has been declared, select the statement which doesn't...
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
  • what are the answers Which detects if x is in the range -4 to +4? (x...

    what are the answers Which detects if x is in the range -4 to +4? (x < -5) AND (* < 5) O (x >-5) AND (* < 5) O (X <-5) OR (x < 5) O (x > -5) OR (* < 5) If the final else branch executes, what must userNum have been? Type "unknown" if appropriate. if (userNum < 9) { > else if (userNum > 11) -- > else { ... // userNum if this executes...

  • In C# (sharp) Assuming a string variable named movie Title has already been declared, which one...

    In C# (sharp) Assuming a string variable named movie Title has already been declared, which one of the following statements combines the strings "Hidden" and "Figures" and then assigns the resulting string to the variable? 1. movieTitle="Hidden" + "Figures"; 2. "Hidden" +"Figures" - moveTitle; 3. movie Title("Hidden" +"Figures"); 4. movie title="Hidden" & "Figures": Look at the following code: int distance; // Declare distance as an int double half://Declare half as a double distance = 35; // Assign 35 to distance...

  • what are the answes Which yields 2.5? (double)(10/4) (int)(10) / (int)(4) 10/4 (double)(10) / (double)(4) Considering...

    what are the answes Which yields 2.5? (double)(10/4) (int)(10) / (int)(4) 10/4 (double)(10) / (double)(4) Considering integer division, determine the result of 13 / 3 4.3 05 4.0 4 Which of the following statements is a valid declaration of a constant integer variable named STEP_SIZE? int STEP_SIZE = 5; O final int STEP_SIZE = 14; double STEP_SIZE = 5; final STEP_SIZE = 10; Which is an invalid identifier? num_Cars1 3numCars O_numCars numCars Which one is not a programming language. Java...

  • Java Questions When creating a for loop, which statement will correctly initialize more than one variable?...

    Java Questions When creating a for loop, which statement will correctly initialize more than one variable? a. for a=1, b=2 c. for(a=1, b=2) b. for(a=1; b=2) d. for(a = 1&& b = 2) A method employee() is returning a double value. Which of the following is the correct way of defining this method? public double employee()                                    c. public int employee() public double employee(int t)                  d. public void employee() The ____ statement is useful when you need to test a...

  • whats the answer When defining a class which has the field name of type String. How...

    whats the answer When defining a class which has the field name of type String. How is the name field declared? String nam name Opublic String name; private name; private String name; Given the following class definition, Which operation can a class user perform on an object of type Restaurant? public class Restaurant // Info about a restaurant // Internal fields public void setName(String restaurant Name) { // Sets the restaurant's name } public void setRating(int user Rating) { //...

  • 1) Which of the following is the name of a local variable in the Strange class...

    1) Which of the following is the name of a local variable in the Strange class below? public class Strange{ public static final int MAX = 5; public static void unknown(){ int number = 0; for (int i = MAX; i >= 1; i--) number += i * i; System.out.println(number); } public static void main(String[] a){ unknown(); } } a) Strange b) int c) MAX d) number e) main 2) Which of the following is NOT a method of the...

  • question 27’s end is in the next page 24 Suppose you have created a list using the statement ArrayList String> NYIT CS Courses new ArrayList(31 What would java do when you try to insert more...

    question 27’s end is in the next page 24 Suppose you have created a list using the statement ArrayList String> NYIT CS Courses new ArrayList(31 What would java do when you try to insert more than 31 courses? ANS: LinelI) check one with x: continue process as usual I Ijava automatically expand array space you manually expand more array spaces 25 Suppose NYIT CS COurscs is an object of the class Array List Suring Write Java statements that will display...

  • Your assignment is to write a grade book for a teacher. The teacher has a text file, which includ...

    Your assignment is to write a grade book for a teacher. The teacher has a text file, which includes student's names, and students test grades. There are four test scores for each student. Here is an example of such a file: Count: 5 Sally 78.0 84.0 79.0 86.0 Rachel 68.0 76.0 87.0 76.0 Melba 87.0 78.0 98.0 88.0 Grace 76.0 67.0 89.0 0.0 Lisa 68.0 76.0 65.0 87.0 The first line of the file will indicate the number of students...

  • Been working on this program for hours and keep getting error. PLEASE help and show a...

    Been working on this program for hours and keep getting error. PLEASE help and show a working output, Thank you Step 2: Declaring variables Examining the problem we need to have 2 variable to store integer input given by the user.     int x,y; Step 3: setting up Scanner object and scanning the inputs import java.util.Scanner; Create Scanner class object by using following syntax Scanner=new Scanner(System.in); /* give some name to the object which ever you want */ Ask the...

  • Name: True/False & Multiple Choice (2 points each) (True / False ) 2 A char literal...

    Name: True/False & Multiple Choice (2 points each) (True / False ) 2 A char literal '2', a string literal "2", and the numeric literal 2 are identical and stored the same way though they are different types. 3 Since comments do not affect the program execution, you don't need to have it at all. 4. After the following statements are executed, the value of the variable rem is 3. 1. A preprocessor directive line starts with a pound sign...

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