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, 22.06.2019 19:00
The fourth generation of computers emerged between 1970s and 1980s. which technological advancement brought about this generation of computers? which computer architecture was used most in this generation?
Answers: 3
question
Computers and Technology, 23.06.2019 07:30
Which option allows you to view slides on the full computer screen?
Answers: 1
question
Computers and Technology, 23.06.2019 12:00
Using the list, you can select the number of photos that will appear on each slide. a. theme b. frame shape c. pictures in album d. picture layout
Answers: 1
question
Computers and Technology, 23.06.2019 22:00
Jackson, who works in the finance department of a company, is holding a seminar for other employees on how to file taxes. only three employees sign up to attend the seminar. which device can he use to share his presentation with a group of three employees?
Answers: 1
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, 08.03.2021 06:20
question
Arts, 08.03.2021 06:20
question
Mathematics, 08.03.2021 06:20
Questions on the website: 13722362