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
An information system is the set of steps that needs to be followed to ensure that software development proceeds in an orderly f
tia_tia [17]

Answer:

True

Explanation:

It is TRUE that An Information System is the set of steps that need to be followed to ensure that software development proceeds in an orderly fashion.

This is evident in the fact that the Information system involves various stages and different elements such as data, people, procedures, hardware, and software.

All these elements form together to create several steps in software development in a suitable manner that meets the clients' and customers' needs.

4 0
3 years ago
I NEED SOME MAJOR HELP W/ THIS!!! PLSSS. WHOEVER HELPS GETS 80 POINTS!!! I NEED IT DONE SOON! TYY <3;)
Oksanka [162]

Answer:

I probably won't awnser them all but I'll try my best

Explanation:

Hacking is a breach of privacy online usually caused by some kind of malware injected into your device there's multiple types of this program or files malware which simply damages and harms your device. A Trojan horse is a program which tricks you by selling you a fake product which has code in it which has code which gives the hacker remote access to your device this program is usually free and masked like a crack or patch of a certain program. U got the second an third question with this one so u can just divide it into pieces. Piracy is Hacking but this time the hacker is stealing ur information through the malware. Invasion of privacy can have multiple forms online and offline. Online intrusion is when a service gives out information you entrust to it while off line Intrusion is stalking trespassing blackmail etc.

4 0
3 years ago
Raul needs to ensure that when users enter an order into the tblOrders, the shipping date is at least two days after
bagirrra123 [75]

Answer:

input mask

Explanation:

Microsoft Access is a database application used to stored data. It is a relational database with rows and columns of data tables in its database.

Data validation is a tool in Access used to put a constraint on how data is entered in the table. The input mask is a data validation type that forces users to enter data in a specified format for a given field or column.

7 0
2 years ago
Read 2 more answers
4.2.3: Basic while loop expression. Write a while loop that prints userNum divided by 2 (integer division) until reaching 1. Fol
wlad13 [49]

Answer:

import java.io.*;

import java.util.Scanner;

class divide {

public static void main (String[] args) {

    Scanner num=new Scanner(System.in);//scanner object.

    int userNum=num.nextInt();

    while(userNum>1)//while loop.

    {

        userNum/=2;//dividing the userNum.

        System.out.print(userNum+" ");//printing the userNum.

    }

}

}

Input:-

40

Output:-

20 10 5 2 1

Input:-

2

Output:-

1

Input:-

0

Output:-

No Output

Input:-

-1

Output:-

No Output.

Explanation:

In the program While loop is used.In the while loop it divides the userNum by 2 in each iteration and prints the value of userNum.The inputs and corresponding outputs are written in the answer.

4 0
3 years ago
Read 2 more answers
This is an example of ______________ of variables:
Sedbober [7]

Answer:

Encapsulation is an example of variables

6 0
3 years ago
Other questions:
  • 3. The following code will not display the results expected by the programmer. Can
    12·1 answer
  • (It science question)
    9·1 answer
  • Markup is best defined as
    11·1 answer
  • What is the name for software designed to find and open Web documents?
    8·1 answer
  • A difference between crt monitors and flat-panel displays is that most flat-panel displays use digital signals to display images
    8·1 answer
  • HELP 11 pointsw to the person who helps me
    11·2 answers
  • Janelle is at the store and can't decide whether to buy steak for dinner or bring home pizza. To get a quick response from her p
    13·1 answer
  • Identify traits of entrepreneurs. Check all of the boxes that apply.
    11·1 answer
  • In series connection, if we have two symmetric devices connected with 10 V battery, voltage for each device will be.. .5V or 10V
    10·1 answer
  • Need help ASAP.<br> I am so lost.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!