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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 04:30, justbepunky
There is a simple pattern for determining if a binary number is odd. what is it and why does this pattern occur? how many bits would you need if you wanted to have the ability to count up to 1000? how high could you count in binary if you used all 10 of your fingers as bits? (finger up means 1, finger down means 0)
Answers: 3
image
Computers and Technology, 22.06.2019 05:00, brylove603
Pls do you believe that the use of 3d animation has grown in feature films over the last few years? if so, do you think the trend will continue? what are the forces driving this trend?
Answers: 2
image
Computers and Technology, 22.06.2019 06:30, Nicki3729
Exchanging which type of data uses the least bandwidth? music photographs video voice bandwidth- the amount of data that can be moved between two points in a set time period
Answers: 1
image
Computers and Technology, 23.06.2019 02:00, HannahVance99
In the context of an internet connection, llc stands for leased line connection liability limited company local loop complex local loop carrier
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 in other subjects: