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
A router is a device that addresses a packet on a network to the next router along the line. Under which layer of the OSI model
makvit [3.9K]
I think it is Network Layer, but not sure about it. Because all have three layers for it: Datalink Layer, Network Layer, Physical Layer
3 0
3 years ago
Refer to the exhibit. If a hacker on the outside network sends an IP packet with source address 172.30.1.50, destination address
Luden [163]

Answer:

The packet is dropped

Explanation:

To see why we need to understand the ACL or Access-control list that is a list of permissions that specify which users can access or modify certain things in a system. Because the source IP  doesn't have any parameter and is just a plain IP and packet the Cisco firewall will drop the packet based on the ACL rules, in other words, the Cisco firewall doesn't have any parameter that allows it to verify the permission-level of the sender, therefore, the packet will drop.  

7 0
3 years ago
Describe the major research, discoveries, or impact Timothy Berners-Lee has made on the scientific community. 100 points for ans
valkas [14]

Answer:

Giving you brainiest

Explanation:

Because why not you just gave me a 100

5 0
3 years ago
The information provided in text aids can help us to understand a text’s content before we even read it.
dimaraw [331]
It is true that the information provided in text aids can help us to understand a text's content before we even read it.
These text aids will contain bits and pieces from the text, which will make us understand the overall message even before we actually get down to going through the text itself. I believe it is better to actually read the text, and try to understand it on your own, before going to these aids for help.
7 0
3 years ago
What are the three modes of the 3D transform manipulator
MrMuchimi
The 3D transform manipulator is used to transform any object in a 3D scene and has three transform operation modes.
1. Translation mode<span>- allows mouse controlled translation in 3D view.</span>
2. Rotation mode - allows mouse controlled rotation in 3D view.
3. Scale mode - allows mouse controlled scaling in 3D view.
All these modes can be accessed on the Transform Orientation menu.



4 0
3 years ago
Other questions:
  • You just read an msds for acetic acid. based on what you read, what type of information is included in an msds sheet? record you
    7·1 answer
  • .<br> 1. Press the _______ key to move to the next cell in a row.
    14·2 answers
  • How do you represent images in binary
    6·2 answers
  • Which one of the following characteristics or skills of a ScrumMaster are closelyaligned with coaching?Select one:
    5·1 answer
  • I Just Realized................
    7·2 answers
  • Write a program that takes the radius of a sphere (a floating-point number) as input and then outputs the sphere’s: Diameter (2
    7·1 answer
  • Enterprise Resource Planning (ERP) is an example of a single user database.
    7·1 answer
  • What is the definition of Overflow Error?
    5·1 answer
  • Write a program to read a list of exam scores given as integer percentages in the range O to 100. Display the total number of gr
    11·1 answer
  • Write a program that calculates the average of N integers. The program should prompt the
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!