subject

1. type a statement that reads a user-entered integer into variable numusers. assume scnr already exists.

2.write a statement that outputs variable numcars as follows. end with a newline.
there are 99 cars.
note: whitespace (blank spaces / blank lines) matters; make sure your whitespace exactly matches the expected output.
public class outputexample {
public static void main (string [] args) {
int numcars = 99;
scannerscnr=new scanner(system. in);
numcars=scnr. nextint();
system. out. println(numcars);
return;
}
}

3. type the statements. then, correct the one syntax error in each statement. hints: statements end in semicolons, and string literals use double quotes.

system. out. printl("predictions are hard.");
system. out. print("especially ');
system. out. println("about the future.").
system. out. println("num is: " - usernum);
import java. util. scanner;

public class errors {
public static void main(string [] args) {
int usernum = 5;

system. out. println ("predictions are hard. ");
system. out. print("especially '");
system. out. print("about the future.");
system. out. println("num: "- usernum);
return;
}
}

errors. java: 10: operator - cannot be applied to java. lang. string, int system. out. println("num: "- usernum); ^ 1 error

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 23:00
Which type of tab stop is most for weights and measurements?
Answers: 1
question
Computers and Technology, 23.06.2019 01:00
Write the command that can be used to answer the following questions. (hint: try each out on the system to check your results.) a. find all files on the system that have the word test" as part of their filename. b. search the path variable for the pathname to the awk command. c. find all files in the /usr directory and subdirectories that are larger than 50 kilobytes in size. d. find all files in the /usr directory and subdirectories that are less than 70 kilobytes in size. e. find all files in the / directory and subdirectories that are symbolic links. f. find all files in the /var directory and subdirectories that were accessed less than 60 minutes ago. g. find all files in the /var directory and subdirectories that were accessed less than six days ago. h. find all files in the /home directory and subdirectories that are empty. i. find all files in the /etc directory and subdirectories that are owned by the group bin."
Answers: 1
question
Computers and Technology, 23.06.2019 02:30
Three out of five seniors remain undecided about a college major at the end of their senior year.
Answers: 3
question
Computers and Technology, 23.06.2019 03:30
Hashtags serve to identify the topic of a given tweet true false
Answers: 2
You know the right answer?
1. type a statement that reads a user-entered integer into variable numusers. assume scnr already ex...
Questions
question
Computers and Technology, 21.09.2019 13:50
question
Mathematics, 21.09.2019 13:50
Questions on the website: 13722363