1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Aleks [24]
3 years ago
8

In this exercise you will debug the code which has been provided in the starter file. The code is intended to do the following:

Computers and Technology
1 answer:
abruzzese [7]3 years ago
8 0

Answer:

The corrected code is as follows:

import java.util.Scanner;

public class U2_L4_Activity_Two{

public static void main(String[] args){

Scanner scan = new Scanner(System.in);

String str1 = scan.nextLine();

String str2 = str1;

str1 = str1.toUpperCase();

System.out.println(str1);

System.out.println(str2);

}

}

Explanation:

This corrects the scanner object

Scanner scan = new Scanner(System.in);

This line is correct

String str1 = scan.nextLine();

This copies str1 to str2

String str2 = str1;

This converts str1 to upper case

str1 = str1.toUpperCase();

This prints str1

System.out.println(str1);

This prints str2

System.out.println(str2);

You might be interested in
What's good computing?
cestrela7 [59]

Answer:

1.Use passwords that can't be easily guessed, and protect your passwords.

2.Minimize storage of sensitive information.

3.Beware of scams.

4.Protect information when using the Internet and email.

5.Make sure your computer is protected with anti-virus and all necessary 6.security "patches" and updates.

7.Secure laptop computers and mobile devices at all times: Lock them up or carry them with you.

8.Shut down, lock, log off, or put your computer and other devices to sleep before leaving them unattended, and make sure they require a secure password to start up or wake-up.

9.Don't install or download unknown or unsolicited programs/apps.

Secure your area before leaving it unattended.

10.Make backup copies of files or data you are not willing to lose.

Explanation:

7 0
1 year ago
Jim wants to shoot a video. This requires him to move from one place to another. Which type of camera support should Jim use?
Arisa [49]

Answer:

I think Jim should use a movement tracker camara

Explanation:

since he is moving around the camera would follow him around

8 0
3 years ago
What does the dashed line in the beaker separating the two sides represent?______________________?
kodGreya [7K]

I guess the correct answer is A membrane

A mеmbranе is a sеlеctivе barriеr; it allοws sοmе things tο pass thrοugh but stοps οthеrs. Such things may bе mοlеculеs, iοns, οr οthеr small particlеs.

7 0
3 years ago
Read 2 more answers
- O conhecimento na Educação Física, normalmente passa do senso comum e vai para um conhecimento mais formal, ou seja, do conhec
neonofarm [45]

Answer:

um i don't understand you do you speak English?

Explanation:

3 0
3 years ago
What is a safe practice when online?
lisabon 2012 [21]

Answer:

Safe work practices are generally written methods outlining how to perform a task with minimum risk to people, equipment, materials, environment, and processes

Explanation:

6 0
2 years ago
Other questions:
  • (tco 7) the .net framework class library consists of ________ that provide many of the functions that you need for developing .n
    12·1 answer
  • Why is a class an excellent representation of an abstract data type?
    15·1 answer
  • Is there any way to delete old questions on this? if there is no way, take this as a free question​
    7·2 answers
  • jeff has just upgraded from windows 7 to windows 10 and he is confused. He has started several universal apps but he can't figur
    11·1 answer
  • Write an algorithm to find the average of three numbers: 10, 20, 30
    7·1 answer
  • The director of security at an organization has begun reviewing vulnerability scanner results and notices a wide range of vulner
    11·1 answer
  • Suppose you have a string matching algorithm that can take in (linear)strings S and T and determine if S is a substring (contigu
    11·2 answers
  • 1.-  POR QUE LOS HUMANOS NOS INTERESAMOS EN ROBOTS CONASPECTO HUMANO?
    8·1 answer
  • Match the following
    13·1 answer
  • * what is an electronic mail ?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!