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
after clicking the start button on your computer screen desktop what option would you then select to examine system components y
Len [333]
Start>hover over "Computer">right-click>Properties>shows system specs

Start>Control Panel>lets you modify network connections, change time and date, update, uninstall programs, add new hardware, etc.
7 0
2 years ago
PLEASE SOMEONE ANSWER THIS
maw [93]
Maybe 7411 or someones birthday in the family
3 0
2 years ago
Read 2 more answers
What are the similarities and differences between the binary and decimal systems?
maks197457 [2]

Answer:

A binary system is a system that functions on zeros and ones (0's and 1's).

A decimal system is an Arabic numeric system that has 10 as its base and uses a dot which is also called a decimal point to show fractions.

Differences

  • A decimal uses ten different digits which is 0-9 while a binary system uses just two digits 0 and 1
  • Decimal system was historically a Hindu-Arabic system while the binary system is just an Arabic system

Similarities

  • They are capable of performing arithmetic operations
  • They both can be represented in decimal form

5 0
2 years ago
The icons to insert pictures and clip art in the PowerPoint application are located in the _____ grouping on the Insert tab.
saul85 [17]
The icons to insert pictures and clip art are located in the images grouping on the insert tab.
3 0
3 years ago
Which of the items below are nodes? fax, IC, NOC, printer, twisted pair cables and workstation.
RSB [31]

The answer is Printer, workstation, NOC, and fax.

Any devices or systems connected to a network are called nodes. When defining a node, always have in mind that it is anything that has an IP address. For instance, if a network connects 5 computers, 1 file server, and 2 printers, there are 8 nodes on this network.

3 0
3 years ago
Other questions:
  • String word = “Awesome”;
    9·2 answers
  • Set numMatches to the number of elements in userValues (having NUM_VALS elements) that equal matchValue. Ex: If matchValue = 2 a
    6·1 answer
  • What were the goals of the “paperless society” ideal?
    14·2 answers
  • Jason is creating a web page for his school's basketball team. He just finished creating his storyboard. Which tool should he us
    6·2 answers
  • What typically happens by default when a file is double clicked in Microsoft Windows?
    9·1 answer
  • What is a characteristic of maintaining logs in a system? A. Logging prevents security violations, but only deals with passive m
    10·1 answer
  • Which of the following is a valid c++ identifier a. mouse b. _int c. 2_stop d. float​
    10·1 answer
  • Write about virus in five points.​
    8·1 answer
  • PLEASE HELP!
    12·1 answer
  • What type of e-mail typically lures users to sites or asks for sensitive information?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!