subject

In this exercise you will debug the code which has been provided in the starter file. The code is intended to do the following: take a string input and store this in the variable str1
copy this string into another variable str2 using the String constructor
change str1 to the upper-case version of its current contents
print str1 on one line, then str2 on the next

1 /* Lesson 4 Coding Activity Question 2 */
2
3 import java. util. Scanner;
4
5 public class U2_L4_Activity_Two{
6 public static void main(String[] args){
7
8 Scanner = new Scanner(System. in);
9 String str1 = scan. nextLine();
10 String str2 = String(str1);
11 str1 = toUpperCase(str1);
12 System. out. println("str1");
13 System. out. println("str1");
14
15 }
16 }

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 04:31
Q14 what is most important for you to choose before you build a network? a. private network b. nos c. network media d. network protocol e. directory service
Answers: 1
question
Computers and Technology, 23.06.2019 10:00
What is estimated time of arrival (eta)? a device that measures the acceleration (the rate of change of velocity) of an item and is used to track truck speeds or taxi cab speeds a gps technology adventure game that posts the longitude and latitude location for an item on the internet for users to find a north/south measurement of position the time of day of an expected arrival at a certain destination and is typically used for navigation applications
Answers: 3
question
Computers and Technology, 23.06.2019 14:30
Select the correct answer. a company wants to use online methods to target more customers. it decides to conduct a market research by collecting the data of a few customers with their consent. they want to track data of the sites that their customers frequently visit. which software can the company? a. spyware b. bots c. adware d. trojan horse e. rootkits
Answers: 1
question
Computers and Technology, 25.06.2019 06:50
Write a program that will askthe user to enter the amount of a purchase. the program should thencompute the state and county sales tax. assume the state sales tax is4 percent and the county sales tax is 2 percent. the program should displaythe amount of the purchase, the state tax, the county sales tax, the total salestax, and the total of the sale. (which is the sum of theamount of purchase plus the total sales tax). hint: use the value 0.02 torepresent 2 percent, and 0.04 to represent 4 percent.
Answers: 2
You know the right answer?
In this exercise you will debug the code which has been provided in the starter file. The code is in...
Questions
question
Mathematics, 23.01.2021 01:10
question
Mathematics, 23.01.2021 01:10
question
English, 23.01.2021 01:10
question
Chemistry, 23.01.2021 01:10
question
Mathematics, 23.01.2021 01:10
question
English, 23.01.2021 01:10
Questions on the website: 13722361